Skip to content

Commit

Permalink
fix predict
Browse files Browse the repository at this point in the history
  • Loading branch information
cancan101 committed May 26, 2016
1 parent 1047acc commit b2bd1e5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion nolearn/lasagne/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,9 @@ def predict(self, X, y=None):
if self.regression:
return self.predict_proba(X, y)
else:
predictions, y_actual = self.predict_proba(X, y)
predictions = self.predict_proba(X, y)
if y is not None:
predictions, y_actual = predictions
y_pred = np.argmax(predictions, axis=1)
if self.use_label_encoder:
y_pred = self.enc_.inverse_transform(y_pred)
Expand Down

0 comments on commit b2bd1e5

Please sign in to comment.