cf0181bb0bf5add0686ca4dd4c03e6fb04a34703,snntoolbox/io_utils/datasets/cifar10.py,,get_cifar10,#Any#Any#Any#,21

Before Change



    (X_train, y_train), (X_test, y_test) = cifar10.load_data()

    X_train = X_train.astype("float32")
    X_test = X_test.astype("float32")
    X_train /= 255
    X_test /= 255

    // convert class vectors to binary class matrices
    Y_train = to_categorical(y_train, nb_classes)
    Y_test = to_categorical(y_test, nb_classes)

    if flat:
        X_train = X_train.reshape(X_train.shape[0], np.prod(X_train.shape[1:]))
        X_test = X_test.reshape(X_test.shape[0], np.prod(X_test.shape[1:]))

    if path is not None:
        if filename is None:
            filename = ""
        filepath = os.path.join(path, filename)
        np.savez_compressed(filepath+"X_norm", X_train[::3])
        np.savez_compressed(filepath+"X_test", X_test)
//       np.savez_compressed(filepath+"Y_train", Y_train)
        np.savez_compressed(filepath+"Y_test", Y_test)

    return (X_train, Y_train, X_test, Y_test)

After Change


    datagen = ImageDataGenerator(rescale=1./255, featurewise_center=gcn,
                                 featurewise_std_normalization=gcn,
                                 zca_whitening=zca)
    datagen.fit(X_test/255.)
    dataflow = datagen.flow(X_test, Y_test, batch_size=len(X_test))
    X_test, Y_test = dataflow.next()

    if flat:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: NeuromorphicProcessorProject/snn_toolbox
Commit Name: cf0181bb0bf5add0686ca4dd4c03e6fb04a34703
Time: 2016-08-22
Author: bodo.rueckauer@gmail.com
File Name: snntoolbox/io_utils/datasets/cifar10.py
Class Name:
Method Name: get_cifar10


Project Name: ntucllab/libact
Commit Name: cb347641837feb9f651038c2f88317563a347627
Time: 2015-12-17
Author: yangarbiter@gmail.com
File Name: libact/models/svm.py
Class Name: SVM
Method Name: train


Project Name: jeongyoonlee/Kaggler
Commit Name: 660d487863cec6e26cdb0184f63a189297577546
Time: 2015-10-11
Author: jeong.@conversionlogic.com
File Name: kaggler/preprocessing/data.py
Class Name: OneHotEncoder
Method Name: fit_transform