You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
//Setup the parameters you will use for this exercise
input_layer_size = 400 // 20x20 Input Images of Digits
hidden_layer_size = 25 // 25 hidden units
num_labels = 10 // 10 labels, from 0 to 9
6.//Load the .mat file, which returns a dictionary
7. weights = loadmat(os.path.join('Data', 'ex3weights.mat'))
8.
9. //get the model weights from the dictionary
10. // Theta1 has size 25 x 401
11. //Theta2 has size 10 x 26
12. Theta1, Theta2 = weights['Theta1'], weights['Theta2']
13.
14. //swap first and last columns of Theta2, due to legacy from MATLAB indexing,
15. //since the weight file ex3weights.mat was saved based on MATLAB indexing
16. Theta2 = np.roll(Theta2, 1, axis=0)
`
here we are swapping first and last row not column (as stated in line 14 [which is incorrect]) with axis = 0 (in line 16) not column .
The text was updated successfully, but these errors were encountered:
`
6.//Load the .mat file, which returns a dictionary
7. weights = loadmat(os.path.join('Data', 'ex3weights.mat'))
8.
9. //get the model weights from the dictionary
10. // Theta1 has size 25 x 401
11. //Theta2 has size 10 x 26
12. Theta1, Theta2 = weights['Theta1'], weights['Theta2']
13.
14. //swap first and last columns of Theta2, due to legacy from MATLAB indexing,
15. //since the weight file ex3weights.mat was saved based on MATLAB indexing
16. Theta2 = np.roll(Theta2, 1, axis=0)
`
here we are swapping first and last row not column (as stated in line 14 [which is incorrect]) with axis = 0 (in line 16) not column .
The text was updated successfully, but these errors were encountered: