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=None):
      """
      Run on end of each epoch
      """
      if logs is None:
          logs = dict()
      logger.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/network_morphism/cifar10/cifar10_keras.py
imports: import argparse
  import logging
  import os
  import tensorflow
  import keras
  from keras.callbacks import EarlyStopping, TensorBoard
  from keras.datasets import cifar10
  from keras.optimizers import SGD, Adadelta, Adagrad, Adam, Adamax, RMSprop
  from keras.utils import multi_gpu_model, to_categorical
  import keras.backend.tensorflow_backend
  import nni
  from nni.algorithms.hpo.networkmorphism_tuner.graph import json_to_graph
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