def get_input_tensors(batch_size,
                      feature_layout,
                      tf_records,
                      num_repeats=1,
                      shuffle_records=True,
                      shuffle_examples=True,
                      shuffle_buffer_size=None,
                      filter_amount=0.05,
                      random_rotation=True):
  """Read tf.Records and prepare them for ingestion by dual_net.

    See `read_tf_records` for parameter documentation.

    Returns a dict of tensors (see return value of batch_parse_tf_example)
  """
  print('Reading tf_records from {} inputs'.format(len(tf_records)))
  dataset = read_tf_records(
      batch_size,
      tf_records,
      num_repeats=num_repeats,
      shuffle_records=shuffle_records,
      shuffle_examples=shuffle_examples,
      shuffle_buffer_size=shuffle_buffer_size,
      filter_amount=filter_amount,
      interleave=False)
  dataset = dataset.filter(lambda t: tf.equal(tf.shape(t)[0], batch_size))
  dataset = dataset.map(
      functools.partial(batch_parse_tf_example, batch_size, feature_layout))
  if random_rotation:
    # Unbatch the dataset so we can rotate it
    dataset = dataset.apply(tf.data.experimental.unbatch())
    dataset = dataset.apply(
        tf.data.experimental.map_and_batch(
            functools.partial(_random_rotation, feature_layout), batch_size))

  return dataset.make_one_shot_iterator().get_next()