tensor2tensor/trax/inputs.py
def inputs(dataset_name, data_dir=None):
  """Make Inputs for built-in datasets.

  Args:
    dataset_name: a TFDS or T2T dataset name. If it's a T2T dataset name, prefix
      with "t2t_".
    data_dir: data directory.

  Returns:
    trax.inputs.Inputs
  """
  assert data_dir, "Must provide a data directory"
  data_dir = os.path.expanduser(data_dir)

  (train_batches, eval_batches,
   input_name, input_shape) = train_and_eval_batches(
       dataset_name, data_dir)

  def train_input_fun():
    return dataset_to_stream(train_batches, input_name)

  def eval_input_fun():
    return dataset_to_stream(eval_batches, input_name)

  return Inputs(train_stream=train_input_fun,
                eval_stream=eval_input_fun,
                input_shape=input_shape)
Make Inputs for built-in datasets.

  Args:
    dataset_name: a TFDS or T2T dataset name. If it's a T2T dataset name, prefix
      with "t2t_".
    data_dir: data directory.

  Returns:
    trax.inputs.Inputs
  
Make Inputs for built-in datasets.
Make Inputs for built - in datasets .
def inputs(dataset_name, data_dir=None):
  assert data_dir, "Must provide a data directory"
  data_dir = os.path.expanduser(data_dir)
  (train_batches, eval_batches,
   input_name, input_shape) = train_and_eval_batches(
       dataset_name, data_dir)
  def train_input_fun():
    return dataset_to_stream(train_batches, input_name)
  def eval_input_fun():
    return dataset_to_stream(eval_batches, input_name)
  return Inputs(train_stream=train_input_fun,
                eval_stream=eval_input_fun,
                input_shape=input_shape)
def inputs ( dataset_name , data_dir = None ) : assert data_dir , "Must provide a data directory" data_dir = os . path . expanduser ( data_dir ) ( train_batches , eval_batches , input_name , input_shape ) = train_and_eval_batches ( dataset_name , data_dir ) def train_input_fun ( ) : return dataset_to_stream ( train_batches , input_name ) def eval_input_fun ( ) : return dataset_to_stream ( eval_batches , input_name ) return Inputs ( train_stream = train_input_fun , eval_stream = eval_input_fun , input_shape = input_shape )
Make Inputs for built-in datasets.
Make Inputs for built - in datasets .
"""Make Inputs for built-in datasets.

  Args:
    dataset_name: a TFDS or T2T dataset name. If it's a T2T dataset name, prefix
      with "t2t_".
    data_dir: data directory.

  Returns:
    trax.inputs.Inputs
  """
None
dataset_name
a TFDS or T2T dataset name. If it's a T2T dataset name, prefix
with "t2t_".
a TFDS or T2T dataset name . If it ' s a T2T dataset name prefix with " t2t_ " .
data_dir
None