class_docstr: Callback to compute specific metric and logs during train and eval
class_docstr_tok: ["Callback","to","compute","specific","metric","and","logs","during","train","and","eval"]
code: def __init__(self, func, eval_ds, eval_task, decoder_type):
      self.func = func
      self.eval_task = eval_task
      self.eval_ds = eval_ds
      self.next_batch_gen = None
      self.decoder_type = decoder_type
  
imports: from absl import logging
  import delta.compat
  import numpy
  from tensorflow.keras.callbacks import Callback
  from tensorflow.keras.callbacks import ModelCheckpoint
  from tensorflow.keras import backend
  from sklearn import metrics
  from tensorflow.python.data.ops import iterator_ops
  from tensorflow.python.data.ops import dataset_ops
  from delta.utils.decode import py_ctc
  from delta.utils.decode import tf_ctc
  from delta.utils import metrics
label_desc: Use image node_id 1 to create a new TokenErrMetricCallBack object from inherited base classes: Callback with example: obj = TokenErrMetricCallBack(func, eval_ds, eval_task, decoder_type)