c826fa9c05f2c8a4ff2e882257adc29e9a21c15c,cleverhans/utils_mnist.py,,data_mnist,#Any#Any#Any#Any#Any#,13
Before Change
from tensorflow.examples.tutorials.mnist import input_data
mnist = input_data.read_data_sets(datadir, one_hot=True, reshape=False)
X_train = np.vstack((mnist.train.images, mnist.validation.images))
Y_train = np.vstack((mnist.train.labels, mnist.validation.labels))
X_test = mnist.test.images
Y_test = mnist.test.labels
X_train = X_train[train_start:train_end]
After Change
X_train = mnist.train_images() / 255.
Y_train = mnist.train_labels()
X_test = mnist.test_images() / 255.
Y_test = mnist.test_labels()
X_train = np.expand_dims(X_train, -1)
X_test = np.expand_dims(X_test, -1)
X_train = X_train[train_start:train_end]
Y_train = Y_train[train_start:train_end]
X_test = X_test[test_start:test_end]
Y_test = Y_test[test_start:test_end]
Y_train = utils.to_categorical(Y_train, num_classes=10)
Y_test = utils.to_categorical(Y_test, num_classes=10)
return X_train, Y_train, X_test, Y_test
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: tensorflow/cleverhans
Commit Name: c826fa9c05f2c8a4ff2e882257adc29e9a21c15c
Time: 2018-06-12
Author: npapernot@users.noreply.github.com
File Name: cleverhans/utils_mnist.py
Class Name:
Method Name: data_mnist
Project Name: explosion/thinc
Commit Name: 0db408d1eea2ce5c1d9b20fe61cb519e059d6cef
Time: 2017-09-15
Author: honnibal+gh@gmail.com
File Name: examples/basic_tagger.py
Class Name:
Method Name: main
Project Name: broadinstitute/keras-rcnn
Commit Name: cf1a024bd9131186ed8c9765bfe3f0a1993150c0
Time: 2017-08-17
Author: allen.goodman@icloud.com
File Name: keras_rcnn/preprocessing/_object_detection.py
Class Name: DictionaryIterator
Method Name: next