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
// 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:
if e.errno == errno.EEXIST and os.path.isdir(cache_dir):
pass
else:
raise
// Download and load MNIST dataset.
(train_data, train_labels), (eval_data, eval_labels) = \
keras.datasets.mnist.load_data("MNIST-data-%d" % hvd.rank())
// The shape of downloaded data is (-1, 28, 28), hence we need to reshape it
In pattern: SUPERPATTERN
Frequency: 4
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: pandas-dev/pandas
Commit Name: 191f859673b755237a99d24f8f4bed4b738870dc
Time: 2020-11-12
Author: jbrockmendel@gmail.com
File Name: pandas/core/indexes/category.py
Class Name: CategoricalIndex
Method Name: _convert_list_indexer
Project Name: soft-matter/trackpy
Commit Name: 9428d2906f0c84f9c28ec1119235fb157e4f7347
Time: 2012-06-21
Author: tcaswell@uchicago.edu
File Name: pytrack/tracking.py
Class Name: Hash_table
Method Name: get_region