dbbf873d7657245fcc25702d3a75079202b0d5ac,train.py,,,#,134

Before Change


        total_loss = tf.reduce_sum(losses) / batch_size + L2

        global_step = tf.Variable(1, trainable=False)
        print("Config:", "n_epoch: ", n_epoch, "batch_size: ", batch_size, "base_lr: ", base_lr, "step_size: ",
              step_size)
        with tf.variable_scope("learning_rate"):
            lr_v = tf.Variable(base_lr, trainable=False)

        opt = tf.train.MomentumOptimizer(lr_v, 0.9)

After Change


        for _input, _target in zip(imgs_file_list, train_targets):
            yield _input.encode("utf-8"), cPickle.dumps(_target)

    n_epoch = math.ceil(n_step / len(imgs_file_list))
    dataset = tf.data.Dataset().from_generator(generator, output_types=(tf.string, tf.string))
    dataset = dataset.map(_map_fn, num_parallel_calls=8)
    // dataset = dataset.shuffle(buffer_size=2046)
    dataset = dataset.repeat(n_epoch)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: tensorlayer/openpose-plus
Commit Name: dbbf873d7657245fcc25702d3a75079202b0d5ac
Time: 2018-08-28
Author: dhsig552@163.com
File Name: train.py
Class Name:
Method Name:


Project Name: jsalt18-sentence-repl/jiant
Commit Name: e1bf3cd5ea60e131ad9401fd30e8de843ef8aadb
Time: 2018-07-02
Author: sbowman@stanford.edu
File Name: src/trainer.py
Class Name: SamplingMultiTaskTrainer
Method Name: _validate


Project Name: biotite-dev/biotite
Commit Name: c9c407951adfd5c101a1875e2761db98eb1f8fa8
Time: 2020-08-18
Author: patrick.kunzm@gmail.com
File Name: doc/examples/scripts/sequence/quality_control.py
Class Name:
Method Name: