cd033991fb0ba018d2f9c6f3434f02a99fa91941,models/experimental/resnet_bfloat16/imagenet_input.py,ImageNetInput,input_fn,#ImageNetInput#Any#,125

Before Change


      return images, labels

    if self.is_training:
      dataset = dataset.map(set_shapes)

    dataset = dataset.prefetch(32)  // Prefetch overlaps in-feed with training
    return dataset  // Must return the dataset and not tensors for high perf!

After Change


    // the same image twice by dropping the final batch if it is less than a full
    // batch size. As long as this validation is done with consistent batch size,
    // exactly the same images will be used.
    dataset = dataset.apply(
        tf.contrib.data.map_and_batch(
            self.dataset_parser, batch_size=batch_size,
            num_parallel_batches=self.num_cores, drop_remainder=True))

    if self.use_transpose:
      dataset = dataset.map(
          lambda images, labels: (tf.transpose(images, [1, 2, 3, 0]), labels),
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 5

Non-data size: 5

Instances


Project Name: tensorflow/tpu
Commit Name: cd033991fb0ba018d2f9c6f3434f02a99fa91941
Time: 2018-06-25
Author: brennan.saeta@gmail.com
File Name: models/experimental/resnet_bfloat16/imagenet_input.py
Class Name: ImageNetInput
Method Name: input_fn


Project Name: tensorflow/tpu
Commit Name: 7d209b46e2f6402e44c69f6fe00384aa14286b08
Time: 2018-03-22
Author: frankchn@google.com
File Name: models/experimental/resnet_bfloat16/imagenet_input.py
Class Name: ImageNetInput
Method Name: input_fn


Project Name: tensorflow/minigo
Commit Name: f4bb1de2fe46de99c03dba0b9c76685a998b4276
Time: 2019-12-12
Author: tmadams@google.com
File Name: preprocessing.py
Class Name:
Method Name: get_input_tensors


Project Name: Pinafore/qb
Commit Name: e79449afe45f4da6f1756a7d92bdd3cd6618c638
Time: 2018-04-25
Author: sjtufs@gmail.com
File Name: qanta/buzzer/util.py
Class Name:
Method Name: process_question


Project Name: keras-team/keras-preprocessing
Commit Name: 6f679b06d10d39edcb066142eec9e3bcd6d9de4b
Time: 2019-02-25
Author: rragundez@users.noreply.github.com
File Name: keras_preprocessing/image/dataframe_iterator.py
Class Name: DataFrameIterator
Method Name: _filter_valid_filepaths