Skip to content

Commit

Permalink
Didn't always initialize weight_val
Browse files Browse the repository at this point in the history
  • Loading branch information
wxs committed Jun 25, 2015
1 parent 62392a4 commit 1564343
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions keras/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,8 @@ def fit(self, X, y, batch_size=128, nb_epoch=100, verbose=1, callbacks=[],
(y, y_val) = (y[:split_at], y[split_at:])
if weights is not None:
(weights, weight_val) = (weights[:split_at], weights[split_at:])
else:
weight_val = None

if verbose:
print("Train on %d samples, validate on %d samples" % (len(y), len(y_val)))
Expand Down

0 comments on commit 1564343

Please sign in to comment.