(self, model, details, checkpoint, bundle)
Constructs a BaseSequenceGenerator.

    Args:
      model: An instance of BaseModel.
      details: A generator_pb2.GeneratorDetails for this generator.
      checkpoint: Where to look for the most recent model checkpoint. Either a
          directory to be used with tf.train.latest_checkpoint or the path to a
          single checkpoint file. Or None if a bundle should be used.
      bundle: A generator_pb2.GeneratorBundle object that contains both a
          checkpoint and a metagraph. Or None if a checkpoint should be used.

    Raises:
      SequenceGeneratorError: if neither checkpoint nor bundle is set.
Constructs a BaseSequenceGenerator.
Constructs a BaseSequenceGenerator .
def __init__(self, model, details, checkpoint, bundle):
    """Constructs a BaseSequenceGenerator.

    Args:
      model: An instance of BaseModel.
      details: A generator_pb2.GeneratorDetails for this generator.
      checkpoint: Where to look for the most recent model checkpoint. Either a
          directory to be used with tf.train.latest_checkpoint or the path to a
          single checkpoint file. Or None if a bundle should be used.
      bundle: A generator_pb2.GeneratorBundle object that contains both a
          checkpoint and a metagraph. Or None if a checkpoint should be used.

    Raises:
      SequenceGeneratorError: if neither checkpoint nor bundle is set.
    """
    self._model = model
    self._details = details
    self._checkpoint = checkpoint
    self._bundle = bundle

    if self._checkpoint is None and self._bundle is None:
      raise SequenceGeneratorError(
          'Either checkpoint or bundle must be set')
    if self._checkpoint is not None and self._bundle is not None:
      raise SequenceGeneratorError(
          'Checkpoint and bundle cannot both be set')

    if self._bundle:
      if self._bundle.generator_details.id != self._details.id:
        raise SequenceGeneratorError(
            'Generator id in bundle (%s) does not match this generator\'s id '
            '(%s)' % (self._bundle.generator_details.id,
                      self._details.id))

    self._initialized = False
def __init__ ( self , model , details , checkpoint , bundle ) : self . _model = model self . _details = details self . _checkpoint = checkpoint self . _bundle = bundle if self . _checkpoint is None and self . _bundle is None : raise SequenceGeneratorError ( 'Either checkpoint or bundle must be set' ) if self . _checkpoint is not None and self . _bundle is not None : raise SequenceGeneratorError ( 'Checkpoint and bundle cannot both be set' ) if self . _bundle : if self . _bundle . generator_details . id != self . _details . id : raise SequenceGeneratorError ( 'Generator id in bundle (%s) does not match this generator\'s id ' '(%s)' % ( self . _bundle . generator_details . id , self . _details . id ) ) self . _initialized = False