8bf7c385c00990bf1d0de1b480336d8c1c9d74e8,train.py,,classifier,#,28

Before Change


        // Get images and labels
        with tf.device("/cpu:0"):
            images, labels = DATASET.distorted_inputs(ARGS.batch_size)
        labels = tf.squeeze(labels)
        log_io(images)
        // Build a Graph that computes the logits predictions from the
        // inference model.
        is_training_, logits = MODEL.get(

After Change


        // Train accuracy ops
        with tf.variable_scope("accuracy"):
            // handle fully convolutional classifiers
            logits_shape = logits.shape
            if len(logits_shape) == 4 and logits_shape[1:3] == [1, 1]:
                top_k_logits = tf.squeeze(logits, [1, 2])
            else:
                top_k_logits = logits
            top_k_op = tf.nn.in_top_k(top_k_logits, labels, 1)
            train_accuracy = tf.reduce_mean(tf.cast(top_k_op, tf.float32))
            // General validation summary
            accuracy_value_ = tf.placeholder(tf.float32, shape=())
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: galeone/dynamic-training-bench
Commit Name: 8bf7c385c00990bf1d0de1b480336d8c1c9d74e8
Time: 2017-02-01
Author: nessuno@nerdz.eu
File Name: train.py
Class Name:
Method Name: classifier


Project Name: ray-project/ray
Commit Name: aa3fd62cac3a0f759f7d884eae3d202a5c72103b
Time: 2020-06-25
Author: ed.nmi.oakes@gmail.com
File Name: python/ray/serve/policy.py
Class Name: RandomEndpointPolicy
Method Name: flush


Project Name: deepchem/deepchem
Commit Name: ed7782f0f59f1eef6453f47633fe9e15bda00f84
Time: 2017-03-23
Author: peter.eastman@gmail.com
File Name: deepchem/models/tensorflow_models/__init__.py
Class Name: TensorflowGraphModel
Method Name: fit