5606f8252aafb57777d6e3b9154ab2256aabd72b,train_decaying_keep_prob.py,,keep_prob_decay,#Any#Any#Any#Any#Any#Any#Any#,37
Before Change
[validation_accuracy] +
[0.0 for i in range(1, num_updates)])
accumulator = tf.cond(
tf.equal(trigger, 1), reset_accumulator,
lambda: accumulator_op)
accumulated = tf.cond(
tf.equal(trigger, 1), lambda: tf.assign(accumulated, 1),
lambda: accumulated_op)
// status variable
keep_prob = tf.assign(
keep_prob,
After Change
lambda: tf.cast(tf.mod(accumulated, num_updates_tensor), tf.int32))
// execute only after position update
with tf.control_dependencies([position]):
def reset_accumulator():
set past validation accuracies to 0 and place actual
validation accuracy in position 0
return tf.scatter_update(
accumulator, [i for i in range(num_updates)],
[validation_accuracy] +
[0.0 for i in range(1, num_updates)])
// update accumulator
// if trigger: reset_acculator, else accumulator[position] = va
accumulator = tf.cond(
tf.equal(trigger, 1), reset_accumulator,
lambda: tf.scatter_update(accumulator, position, validation_accuracy)
)
// update accumulated (for current prob)
// if trigger; accumulated = 1, else accumulated +=1
accumulated = tf.cond(
tf.equal(trigger, 1),
lambda: tf.assign(accumulated, 1),
lambda: tf.assign_add(accumulated, 1))
return keep_prob
def train():
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
Instances
Project Name: galeone/dynamic-training-bench
Commit Name: 5606f8252aafb57777d6e3b9154ab2256aabd72b
Time: 2016-10-27
Author: nessuno@nerdz.eu
File Name: train_decaying_keep_prob.py
Class Name:
Method Name: keep_prob_decay
Project Name: galeone/dynamic-training-bench
Commit Name: 030f2785177566814a69e392337b13f48833a187
Time: 2016-10-27
Author: nessuno@nerdz.eu
File Name: train_decaying_keep_prob.py
Class Name:
Method Name: keep_prob_decay
Project Name: wenwei202/iss-rnns
Commit Name: 93fda31782f2e1f20867b8e8b54bc1547b5f2524
Time: 2016-09-16
Author: seominjoon@gmail.com
File Name: basic/model.py
Class Name: Model
Method Name: _build_forward