147ebde5c074d2cc25cbab8d0435abc056877fc5,tensorflow_datasets/image/cifar.py,Cifar10,_split_generators,#Cifar10#Any#,81

Before Change



    // Load the label names
    metadata = _load_pickle(os.path.join(cifar_path, cifar_info.meta_file))
    for label_key in cifar_info.label_keys:
      label_key = _strip_s(label_key)  // labels => label
      label_names = metadata["{}_names".format(label_key)]

      self.info.features[_label_to_feature_key(label_key)].names = label_names

    // Define the splits
    def gen_filenames(filenames):
      for f in filenames:
        yield os.path.join(cifar_path, f)

After Change


    for label_key, label_file in zip(cifar_info.label_keys,
                                     cifar_info.label_files):
      labels_path = os.path.join(cifar_path, label_file)
      with tf.io.gfile.GFile(labels_path) as label_f:
        label_names = [name for name in label_f.read().split("\n") if name]
      self.info.features[label_key].names = label_names

    // Define the splits
    def gen_filenames(filenames):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: tensorflow/datasets
Commit Name: 147ebde5c074d2cc25cbab8d0435abc056877fc5
Time: 2019-02-04
Author: pierrot@google.com
File Name: tensorflow_datasets/image/cifar.py
Class Name: Cifar10
Method Name: _split_generators


Project Name: tensorflow/datasets
Commit Name: 3404c3e64990dc7290a944313f3dccca54512710
Time: 2019-12-06
Author: c.taneja09@gmail.com
File Name: tensorflow_datasets/image/food101.py
Class Name: Food101
Method Name: _generate_examples


Project Name: bokeh/bokeh
Commit Name: c3534b1a8a5de16cc797c2b4d239059322c766db
Time: 2016-01-09
Author: bryanv@continuum.io
File Name: bokeh/application/handlers/script.py
Class Name: ScriptHandler
Method Name: __init__