fe0950e68d35e29237d9d5ca82aabc8ff8a011ba,niftynet/engine/application_driver.py,ApplicationDriver,_create_graph,#ApplicationDriver#,171

Before Change


            // moving average operation
            variable_averages = tf.train.ExponentialMovingAverage(0.9)
            trainables = tf.trainable_variables()
            moving_ave_op = variable_averages.apply(trainables)

            // training operation
            if self.is_training:
                updates_op = [moving_ave_op]
                updates_op.extend(bn_ops) if bn_ops is not None else None
                with graph.control_dependencies(updates_op):
                    averaged_grads = gradients_collector.average_gradients()
                    self.app.set_network_update_op(averaged_grads)

            // assigning output variables back to each application
            self.app.set_all_output_ops([net_outputs, tf.global_variables()])

After Change


                if not mva_op.type == "NoOp":
                    updates_op.extend(mva_op)
                // batch normalisation moving averages operation
                if bn_ops is not None and len(bn_ops) > 0:
                    updates_op.extend(bn_ops)
                // combine them with model parameter updating operation
                with graph.control_dependencies(updates_op):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: NifTK/NiftyNet
Commit Name: fe0950e68d35e29237d9d5ca82aabc8ff8a011ba
Time: 2017-07-25
Author: wenqi.li@ucl.ac.uk
File Name: niftynet/engine/application_driver.py
Class Name: ApplicationDriver
Method Name: _create_graph


Project Name: has2k1/plotnine
Commit Name: 190065554d8905884dff948e4bb655d431d7eec3
Time: 2015-04-20
Author: has2k1@gmail.com
File Name: ggplot/stats/stat.py
Class Name: stat
Method Name: _calculate_groups


Project Name: daavoo/pyntcloud
Commit Name: b6106d3044f7800af8710cbdc998ed78f7e6588c
Time: 2016-11-30
Author: daviddelaiglesiacastro@gmail.com
File Name: pyntcloud/structures/octree.py
Class Name: Octree
Method Name: get_level_as_sf