(self, wmodel, temperature=1, logger=None, **unused_kwargs)
Initialize a BaseSampler instance.

    Args:
      wmodel: a WrappedModel instance
      temperature: sampling temperature
      logger: Logger instance
Initialize a BaseSampler instance.
Initialize a BaseSampler instance .
def __init__(self, wmodel, temperature=1, logger=None, **unused_kwargs):
    """Initialize a BaseSampler instance.

    Args:
      wmodel: a WrappedModel instance
      temperature: sampling temperature
      logger: Logger instance
    """
    self.wmodel = wmodel
    self.temperature = temperature
    self.logger = logger if logger is not None else lib_logging.NoLogger()

    def predictor(pianorolls, masks):
      predictions = self.wmodel.sess.run(self.wmodel.model.predictions, {
          self.wmodel.model.pianorolls: pianorolls,
          self.wmodel.model.masks: masks
      })
      return predictions

    self.predictor = lib_tfutil.RobustPredictor(predictor)
def __init__ ( self , wmodel , temperature = 1 , logger = None , * * unused_kwargs ) : self . wmodel = wmodel self . temperature = temperature self . logger = logger if logger is not None else lib_logging . NoLogger ( ) def predictor ( pianorolls , masks ) : predictions = self . wmodel . sess . run ( self . wmodel . model . predictions , { self . wmodel . model . pianorolls : pianorolls , self . wmodel . model . masks : masks } ) return predictions self . predictor = lib_tfutil . RobustPredictor ( predictor )