class_docstr: Evalutes note-based negative likelihood.
code: def __call__(self, pianoroll):
      tt, pp, ii = pianoroll.shape
      assert self.separate_instruments or ii == 1
      dd = ii if self.separate_instruments else pp
  
      # compile a batch with an example for each variable
      bb = tt * dd
      xs = np.tile(pianoroll[None], [bb, 1, 1, 1])
  
      ts, ds = self.draw_ordering(tt, dd)
      assert len(ts) == bb and len(ds) == bb
  
      # set up sequence of masks, one for each variable
      mask = []
      mask_scratch = np.ones([tt, pp, ii], dtype=np.float32)
      for unused_j, (t, d) in enumerate(zip(ts, ds)):
          mask.append(mask_scratch.copy())
          if self.separate_instruments:
              mask_scratch[t, :, d] = 0
          else:
              mask_scratch[t, d, :] = 0
      assert np.allclose(mask_scratch, 0)
      del mask_scratch
      mask = np.array(mask)
  
      pxhats = self.predictor(xs, mask)
  
      lls = np.zeros([tt, dd], dtype=np.float32)
      self._update_lls(lls, xs, pxhats, ts, ds)
      return lls
  
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 for calling the NoteEvaluator obj's underlying member method code with example usage: obj.__call__(pianoroll) and returns: lls