Skip to content

Commit b9df998

Browse files
rahul003jarednielsen
authored andcommitted
Set mode on each batch (aws#65)
1 parent ae71687 commit b9df998

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

smdebug/tensorflow/keras.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -479,6 +479,11 @@ def _on_any_batch_begin(self, batch, mode, logs=None):
479479
if self._is_not_supported():
480480
return
481481

482+
# set mode for each batch as when users run model.fit() and pass validation data
483+
# through the optional argument, then mode_begin is not called for the training steps
484+
# after first evaluation during training
485+
self.set_mode(mode)
486+
482487
self._close_writers()
483488
self._increment_step()
484489

0 commit comments

Comments
 (0)