87ff637109458f019eb574c798fcf28fc244f735,snntoolbox/model_libs/keras_input_lib.py,,evaluate,#Any#Any#Any#Any#,247

Before Change


        for i in range(batches):
            // Get samples from Keras.ImageDataGenerator
            x_batch, y_batch = dataflow.next()
            if True:  // Only for imagenet!
                print("Preprocessing input for ImageNet")
                x_batch = np.add(np.multiply(x_batch, 2. / 255.), - 1.).astype(
                    "float32")
            loss, acc = val_fn(x_batch, y_batch, verbose=0)
            score[0] += loss
            score[1] += acc
        score[0] /= batches

After Change


    (``Keras.ImageDataGenerator.flow_from_directory`` object).
    

    num_to_test = len(x_test) if x_test is not None else settings["num_to_test"]
    print("Using {} samples to evaluate input model.".format(num_to_test))

    if x_test is not None:
        score = val_fn(x_test, y_test, verbose=0)
    else:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: NeuromorphicProcessorProject/snn_toolbox
Commit Name: 87ff637109458f019eb574c798fcf28fc244f735
Time: 2017-04-10
Author: bodo.rueckauer@gmail.com
File Name: snntoolbox/model_libs/keras_input_lib.py
Class Name:
Method Name: evaluate


Project Name: commonsense/conceptnet5
Commit Name: 7d6c3799784fda8087ee03ba1571cdb809a3ac8d
Time: 2016-07-13
Author: rob@luminoso.com
File Name: conceptnet5/readers/dbpedia.py
Class Name:
Method Name: process_dbpedia


Project Name: NeuromorphicProcessorProject/snn_toolbox
Commit Name: 87ff637109458f019eb574c798fcf28fc244f735
Time: 2017-04-10
Author: bodo.rueckauer@gmail.com
File Name: snntoolbox/model_libs/lasagne_input_lib.py
Class Name:
Method Name: evaluate