MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / on_epoch_begin

Method on_epoch_begin

tensorflow/python/keras/callbacks_v1.py:374–387  ·  view source on GitHub ↗

Add histogram op to Model eval_function callbacks, reset batch count.

(self, epoch, logs=None)

Source from the content-addressed store, hash-verified

372 self._is_profiling = True
373
374 def on_epoch_begin(self, epoch, logs=None):
375 """Add histogram op to Model eval_function callbacks, reset batch count."""
376
377 # check if histogram summary should be run for this epoch
378 if self.histogram_freq and epoch % self.histogram_freq == 0:
379 self._epoch = epoch
380 # pylint: disable=protected-access
381 # add the histogram summary op if it should run this epoch
382 self.model._make_test_function()
383 if self.merged not in self.model.test_function.fetches:
384 self.model.test_function.fetches.append(self.merged)
385 self.model.test_function.fetch_callbacks[
386 self.merged] = self._fetch_callback
387 # pylint: enable=protected-access
388
389 def on_epoch_end(self, epoch, logs=None):
390 """Checks if summary ops should run next epoch, logs scalar summaries."""

Callers

nothing calls this directly

Calls 2

_make_test_functionMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected