Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ex1/softmax_regression_vec.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
%
% X - The examples stored in a matrix.
% X(i,j) is the i'th coordinate of the j'th example.
% y - The label for each example. y(j) is the j'th example's label.
% y - Row vector of labels for each example. y(j) is the j'th example's label.
%
m=size(X,2);
n=size(X,1);

% theta is a vector; need to reshape to n x num_classes.
% theta is a vector; need to reshape to n x (num_classes-1).
theta=reshape(theta, n, []);
num_classes=size(theta,2)+1;

Expand Down