Skip to content

Instantly share code, notes, and snippets.

View sascharo's full-sized avatar
🎯
Focusing

Sascha Roman Robitzki sascharo

🎯
Focusing
  • Singapore
  • 10:11 (UTC +08:00)
View GitHub Profile
function [J grad] = nnCostFunction(nn_params, ...
input_layer_size, ...
hidden_layer_size, ...
num_labels, ...
X, y, lambda)
%NNCOSTFUNCTION Implements the neural network cost function for a two layer
%neural network which performs classification
% [J grad] = NNCOSTFUNCTON(nn_params, hidden_layer_size, num_labels, ...
% X, y, lambda) computes the cost and gradient of the neural network. The
% parameters for the neural network are "unrolled" into the vector