7d90bd15cf2112db4881429c909aa6104749b870,examples/tensorflow_mnist_estimator.py,,main,#Any#,129

Before Change


    train_data = mnist.train.images  // Returns np.array
    train_labels = np.asarray(mnist.train.labels, dtype=np.int32)
    eval_data = mnist.test.images  // Returns np.array
    eval_labels = np.asarray(mnist.test.labels, dtype=np.int32)

    // Horovod: pin GPU to be used to process local rank (one GPU per process)
    config = tf.ConfigProto()
    config.gpu_options.allow_growth = True

After Change


    // condition among the workers that share the same filesystem. If the
    // directory already exists by the time this worker gets around to creating
    // it, ignore the resulting exception and continue.
    cache_dir = os.path.join(os.path.expanduser("~"), ".keras", "datasets")
    if not os.path.exists(cache_dir):
        try:
            os.mkdir(cache_dir)
        except OSError as e:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: horovod/horovod
Commit Name: 7d90bd15cf2112db4881429c909aa6104749b870
Time: 2018-12-10
Author: fardin.abdi@gmail.com
File Name: examples/tensorflow_mnist_estimator.py
Class Name:
Method Name: main


Project Name: yzhao062/pyod
Commit Name: fec5e567f52fec1ec897431c3108c290746dcd10
Time: 2018-06-03
Author: yuezhao@cs.toronto.edu
File Name: examples/feat_bagging_example.py
Class Name:
Method Name:


Project Name: deepmipt/DeepPavlov
Commit Name: 61980b57db5349ec0adc4a7b4797ee4742c21b73
Time: 2018-02-15
Author: yoptar@gmail.com
File Name: deeppavlov/models/classifiers/intents/intent_model.py
Class Name: KerasIntentModel
Method Name: texts2vec