ef234844e1604d5496607fcf48886d9e556c0685,engine/training.py,,run,#Any#Any#Any#Any#,20

Before Change


                    bn_updates = tf.get_collection(tf.GraphKeys.UPDATE_OPS)

        ave_loss = tf.reduce_mean(tower_losses)
        ave_miss = tf.reduce_mean(tower_misses)
        ave_grads = util.average_grads(tower_grads)
        apply_grad_op = train_step.apply_gradients(ave_grads)
        // summary for visualisations
        // tracking current batch loss

After Change


                //     current_iter, loss_value, miss_value, iter_time))
                print("iter {:d}, loss={:.8f} ({:.3f}s)".format(
                    current_iter, loss_value, iter_time))
                if (current_iter % 20) == 0:
                    writer.add_summary(sess.run(write_summary_op), current_iter)
                    // Plot reconstructions for the basic autoencoder
                    for p in range(0,4):
                        plt.subplot(4, 2, 2*p+1)
                        temp1 = sess.run(predictions[0])
                        temp1 = temp1[p,:,12,:,0]
                        temp1.reshape(24, 24)
                        plt.imshow(temp1, cmap="gray")
                        plt.subplot(4, 2, 2*p+2)
                        temp2 = sess.run(predictions[1])
                        temp2 = temp2[p, :, 12, :, 0]
                        temp2.reshape(24, 24)
                        plt.imshow(temp2, cmap="gray")
                    plt.pause(0.0001)
                if (current_iter % param.save_every_n) == 0 and i > 0:
                    saver.save(sess, ckpt_name, global_step=current_iter)
                    print("Iter {} model saved at {}".format(
                        current_iter, ckpt_name))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: NifTK/NiftyNet
Commit Name: ef234844e1604d5496607fcf48886d9e556c0685
Time: 2017-06-21
Author: r.gray@ucl.ac.uk
File Name: engine/training.py
Class Name:
Method Name: run


Project Name: khaotik/DaNet-Tensorflow
Commit Name: 15ebbc412a58cc799063e781981ff5937e3d3fd9
Time: 2017-08-14
Author: junkkhaotik@gmail.com
File Name: app/ops.py
Class Name:
Method Name: pit_mse_loss


Project Name: reinforceio/tensorforce
Commit Name: ed233350fa0580747d9f9e247c9aa7933c1526e9
Time: 2017-06-11
Author: mi.schaarschmidt@gmail.com
File Name: tensorforce/models/naf_model.py
Class Name: NAFModel
Method Name: create_tf_operations