cdf52a41ffadabbd505c45919bb29503ae0820b8,cleverhans/utils_tf.py,,model_train,#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#,43

Before Change


    // Define optimizer
    loss_value = loss.fprop(x, y, **fprop_args)
    train_step = tf.train.AdamOptimizer(learning_rate=args.learning_rate)
    with tf.control_dependencies(tf.get_collection(tf.GraphKeys.UPDATE_OPS)):
        train_step = train_step.minimize(loss_value, var_list=var_list)

    with sess.as_default():

After Change



    // Define loss
    loss = model_loss(y, predictions)
    if predictions_adv is not None:
        loss = (loss + model_loss(y, predictions_adv)) / 2

    train_step = tf.train.AdamOptimizer(learning_rate=args.learning_rate)
    train_step = train_step.minimize(loss, var_list=var_list)

    with sess.as_default():
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: tensorflow/cleverhans
Commit Name: cdf52a41ffadabbd505c45919bb29503ae0820b8
Time: 2018-07-09
Author: dberth@google.com
File Name: cleverhans/utils_tf.py
Class Name:
Method Name: model_train


Project Name: chris-chris/pysc2-examples
Commit Name: 48d178cfbb60e5b0004f63b2eca37b2449bb6c67
Time: 2017-10-31
Author: sjhshy@gmail.com
File Name: a2c/a2c.py
Class Name: Model
Method Name: __init__


Project Name: deepchem/deepchem
Commit Name: 84398f9fb6e6a8d2bb913367fdd389f9ca3a5405
Time: 2019-04-08
Author: peastman@stanford.edu
File Name: deepchem/models/tensorgraph/tensor_graph.py
Class Name: TensorGraph
Method Name: get_layer_variables