Open Legitao opened 3 years ago
The line to calculate the cost of Softmax output is not quite correct. Since Y and A are of shape (n_categories, batch_size), the cost should be
So I think the correct version should be np.mean(-np.sum(Y * np.log(A.T), axis=0))
np.mean(-np.sum(Y * np.log(A.T), axis=0))
The line to calculate the cost of Softmax output is not quite correct. Since Y and A are of shape (n_categories, batch_size), the cost should be
So I think the correct version should be
np.mean(-np.sum(Y * np.log(A.T), axis=0))