Commits

Jure Žbontar committed 5d94c93

Code cleanup.

  • Participants
  • Parent commits fb1abba

Comments (0)

Files changed (1)

             self.cost_grad, params, args=(X, y), **self.fmin_args)
 
     def predict(self, X):
-        m, n = X.shape
         Theta1, Theta2 = self.unfold_params(self.thetas)
-        a2 = sigmoid(append_ones(X).dot(self.Theta1.T))
-        a3 = sigmoid(np.column_stack((np.ones(m), a2)).dot(self.Theta2.T))
+        a2 = sigmoid(append_ones(X).dot(Theta1.T))
+        a3 = sigmoid(np.column_stack((np.ones(X.shape[0]), a2)).dot(Theta2.T))
 
         return a3