420747a2f5f6f23b84f62f9a00481ef53a4a4623,train.py,,,#,132

Before Change


            x = train_data.next(args.init_batch_size) // manually retrieve exactly init_batch_size examples
            train_data.reset() // rewind the iterator back to 0 to do one full epoch
            print("initializing the model...")
            sess.run(initializer,{x_init: prepro(x)})
            if args.load_params:
                ckpt_file = args.save_dir + "/params_" + args.data_set + ".ckpt"
                print("restoring parameters from", ckpt_file)

After Change


        // train for one epoch
        train_losses = []
        for d in train_data:
            feed_dict = make_feed_dict(d)
            // forward/backward/update model on each gpu
            lr *= args.lr_decay
            feed_dict.update({ tf_lr: lr })
            l,_ = sess.run([bits_per_dim, optimizer], feed_dict)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: openai/pixel-cnn
Commit Name: 420747a2f5f6f23b84f62f9a00481ef53a4a4623
Time: 2016-11-11
Author: tim@Tims-MacBook-Pro.local
File Name: train.py
Class Name:
Method Name:


Project Name: dpressel/mead-baseline
Commit Name: df1227cde999fd4c1e1df2d49dfa45f9d6455b60
Time: 2017-06-29
Author: dpressel@gmail.com
File Name: python/baseline/tf/seq2seq/train.py
Class Name: Seq2SeqTrainerTf
Method Name: test


Project Name: dpressel/mead-baseline
Commit Name: df1227cde999fd4c1e1df2d49dfa45f9d6455b60
Time: 2017-06-29
Author: dpressel@gmail.com
File Name: python/baseline/tf/seq2seq/train.py
Class Name: Seq2SeqTrainerTf
Method Name: train