class_docstr: Evaluator base class.
docstr: Initialize BaseEvaluator instance.
  
  Args:
    wmodel: WrappedModel instance
    chronological: whether to evaluate in chronological order or in any order
docstr_tok: ["Initialize","BaseEvaluator","instance",".","Args",":","wmodel",":","WrappedModel","instance","chronological",":","whether","to","evaluate","in","chronological","order","or","in","any","order"]
code: def __init__(self, wmodel, chronological):
      """Initialize BaseEvaluator instance.
  
      Args:
        wmodel: WrappedModel instance
        chronological: whether to evaluate in chronological order or in any order
      """
      self.wmodel = wmodel
      self.chronological = chronological
  
      def predictor(pianorolls, masks):
          p = self.wmodel.sess.run(
              self.wmodel.model.predictions,
              feed_dict={
                  self.wmodel.model.pianorolls: pianorolls,
                  self.wmodel.model.masks: masks,
              },
          )
          return p
  
      self.predictor = lib_tfutil.RobustPredictor(predictor)
  
imports: import time
  from magenta.models.coconet import lib_tfutil
  from magenta.models.coconet import lib_util
  import numpy
  from scipy.misc import logsumexp
  import tensorflow.compat.v1
label_desc: Use image node_id 1 to create a new BaseEvaluator object from inherited base classes: lib_util with example: obj = BaseEvaluator(wmodel, chronological)