7274fee9b40e6788f0a2f2e8a3e7d17da243e2a3,engine/training.py,,run,#Any#Any#Any#Any#,23

Before Change


                        reg_loss = tf.reduce_mean([tf.reduce_mean(reg_loss)
                                                for reg_loss in reg_losses])
                        loss = loss + reg_loss
                tf.summary.scalar("loss",loss,[engine.logging.CONSOLE,engine.logging.LOG])

                ////////////////////////////////////
                // This should probably be refactored into an application class
                // Averages are in name_scope for Tensorboard naming; summaries are outside for console naming

After Change


                // This should probably be refactored into an application class
                // Averages are in name_scope for Tensorboard naming; summaries are outside for console naming
                with tf.name_scope("ConsoleLogging"):
                    logs=[["loss",loss]]
                    if param.application_type == "segmentation":
                        // TODO compute miss for dfferent target types
                        logs.append(["miss", tf.reduce_mean(tf.cast(
                              tf.not_equal(tf.argmax(predictions, -1), labels[..., 0]),
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: NifTK/NiftyNet
Commit Name: 7274fee9b40e6788f0a2f2e8a3e7d17da243e2a3
Time: 2017-07-04
Author: eli.gibson@ucl.ac.uk
File Name: engine/training.py
Class Name:
Method Name: run


Project Name: arnomoonens/yarll
Commit Name: 8b97a5a397372f622bd2c06924c75b1104008698
Time: 2018-05-29
Author: arno.moonens@gmail.com
File Name: agents/reinforce.py
Class Name: REINFORCE
Method Name: __init__


Project Name: NifTK/NiftyNet
Commit Name: 1d0d8958f556638dfd118d416a0a91f502699258
Time: 2017-07-04
Author: r.gray@ucl.ac.uk
File Name: engine/training.py
Class Name:
Method Name: run


Project Name: senarvi/theanolm
Commit Name: 2c12d5f7ead1e7fc04d3cfd0efec6830208611e3
Time: 2015-10-05
Author: seppo.git@marjaniemi.com
File Name: theanolm/src/theanolm/trainers/modeltrainer.py
Class Name: ModelTrainer
Method Name: __init__