class_docstr: Callback class for reporting intermediate accuracy metrics.
  
  This callback sends accuracy to NNI framework every 100 steps,
  so you can view the learning curve on web UI.
  
  If an assessor is configured in experiment's YAML file,
  it will use these metrics for early stopping.
docstr: Reports intermediate accuracy to NNI framework
docstr_tok: ["Reports","intermediate","accuracy","to","NNI","framework"]
code: def on_epoch_end(self, epoch, logs=None):
      """Reports intermediate accuracy to NNI framework"""
      # 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-tfv2/mnist.py
imports: import logging
  import tensorflow
  from tensorflow.keras import Model
  from tensorflow.keras.callbacks import Callback
  from tensorflow.keras.layers import Conv2D, Dense, Dropout, Flatten, MaxPool2D
  from tensorflow.keras.optimizers import Adam
  import nni
label_desc: Use image node_id 1 for calling the ReportIntermediates obj's underlying member method code with example usage: obj.on_epoch_end(epoch, logs) without return types