Last active
December 14, 2018 12:47
-
-
Save gognjanovski/e42ce8366c0f45e424b5549eefbc3e32 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
options = optimset('MaxIter', 100); | |
... | |
% Now, costFunction is a function that takes in only one argument (the | |
% neural network parameters) | |
[nn_params, cost] = fmincg(costFunction, initial_nn_params, options); | |
% Obtain Theta1 and Theta2 back from nn_params | |
Theta1 = reshape(nn_params(1:hidden_layer_size * (input_layer_size + 1)), ... | |
hidden_layer_size, (input_layer_size + 1)); | |
Theta2 = reshape(nn_params((1 + (hidden_layer_size * (input_layer_size + 1))):end), ... | |
num_labels, (hidden_layer_size + 1)); | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment