class_docstr: Keras callback to send metrics to NNI framework
class_docstr_tok: ["Keras","callback","to","send","metrics","to","NNI","framework"]
docstr: Run on end of each epoch
docstr_tok: ["Run","on","end","of","each","epoch"]
code: def on_epoch_end(self, epoch, logs={}):
      """
      Run on end of each epoch
      """
      LOG.debug(logs)
      # TensorFlow 2.0 API reference claims the key is `val_acc`, but in fact it's `val_accuracy`
      if "val_acc" in logs:
          nni.report_intermediate_result(logs["val_acc"])
      else:
          nni.report_intermediate_result(logs["val_accuracy"])
  
file_path: nni/examples/trials/mnist-keras/mnist-keras.py
imports: import argparse
  import logging
  import os
  import keras
  import numpy
  from keras import backend
  from keras.callbacks import TensorBoard
  from keras.datasets import mnist
  from keras.layers import Conv2D, Dense, Flatten, MaxPooling2D
  from keras.models import Sequential
  import nni
label_desc: Use image node_id 1 for calling the SendMetrics obj's underlying member method code with example usage: obj.on_epoch_end(epoch, logs) without return types