53633acd7c861fd73e3954088a48d0ac8dc42895,niftynet/application/gan_application.py,GANApplication,connect_data_and_network,#GANApplication#Any#Any#,132

Before Change


                    learning_rate=self.action_param.lr)

            // a new pop_batch_op for each gpu tower
            data_dict = self.get_sampler()[0].pop_batch_op()

            images = tf.cast(data_dict["image"], tf.float32)
            noise_shape = [self.net_param.batch_size,
                           self.gan_param.noise_size]
            noise = tf.Variable(tf.random_normal(shape=noise_shape,
                                                 mean=0.0,
                                                 stddev=1.0,
                                                 dtype=tf.float32))
            tf.stop_gradient(noise)
            conditioning = data_dict["conditioning"]
            net_output = self.net(noise,
                                  images,
                                  conditioning,
                                  self.is_training)
            loss_func = LossFunction(
                loss_type=self.action_param.loss_type)
            real_logits = net_output[1]

After Change


                // add the grads back to application_driver"s training_grads
                gradients_collector.add_to_collection(grads)
        else:
            data_dict = self.get_sampler()[0][0].pop_batch_op()
            conditioning_dict = self.get_sampler()[1].pop_batch_op()
            conditioning = conditioning_dict["conditioning"]
            image_size = conditioning.shape.as_list()[:-1]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: NifTK/NiftyNet
Commit Name: 53633acd7c861fd73e3954088a48d0ac8dc42895
Time: 2017-11-01
Author: eli.gibson@gmail.com
File Name: niftynet/application/gan_application.py
Class Name: GANApplication
Method Name: connect_data_and_network


Project Name: NifTK/NiftyNet
Commit Name: 53633acd7c861fd73e3954088a48d0ac8dc42895
Time: 2017-11-01
Author: eli.gibson@gmail.com
File Name: niftynet/application/autoencoder_application.py
Class Name: AutoencoderApplication
Method Name: connect_data_and_network


Project Name: NifTK/NiftyNet
Commit Name: 01f1bcb376dfd967603c785a255f927dea2712b6
Time: 2017-11-15
Author: wenqi.li@ucl.ac.uk
File Name: demos/BRATS17/brats_segmentation.py
Class Name: BRATSApp
Method Name: connect_data_and_network