Skip to content

Commit ff3d062

Browse files
committed
Validation data batching in .fit()
1 parent abedfa8 commit ff3d062

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

keras/models.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,10 +256,10 @@ def fit(self, X, y, batch_size=128, nb_epoch=100, verbose=1,
256256
# validation
257257
if do_validation and (batch_index == len(batches) - 1):
258258
if show_accuracy:
259-
val_loss, val_acc = self.test(X_val, y_val, accuracy=True)
259+
val_loss, val_acc = self.evaluate(X_val, y_val, batch_size=batch_size, verbose=0, show_accuracy=True)
260260
log_values += [('val. loss', val_loss), ('val. acc.', val_acc)]
261261
else:
262-
val_loss = self.test(X_val, y_val)
262+
val_loss = self.evaluate(X_val, y_val, batch_size=batch_size, verbose=0)
263263
log_values += [('val. loss', val_loss)]
264264

265265
# logging

0 commit comments

Comments
 (0)