e9e215c2f7ca0bbbded08d34c834c2a3f43bb8d0,pro_gan_pytorch/Losses.py,WGAN_GP,__gradient_penalty,#WGAN_GP#Any#Any#Any#Any#Any#,109

Before Change



        // perform backward pass from op to merged for obtaining the gradients
        gradient = th.autograd.grad(outputs=op, inputs=merged,
                                    grad_outputs=th.ones(op.size()).cuda(fake_samps.device),
                                    create_graph=True, retain_graph=True, only_inputs=True)[0]

        // calculate the penalty using these gradients

After Change



        // perform backward pass from op to merged for obtaining the gradients
        gradient = th.autograd.grad(outputs=op, inputs=merged,
                                    grad_outputs=th.ones_like(op), create_graph=True,
                                    retain_graph=True, only_inputs=True)[0]

        // calculate the penalty using these gradients
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: akanimax/pro_gan_pytorch
Commit Name: e9e215c2f7ca0bbbded08d34c834c2a3f43bb8d0
Time: 2019-01-09
Author: akanimax@gmail.com
File Name: pro_gan_pytorch/Losses.py
Class Name: WGAN_GP
Method Name: __gradient_penalty


Project Name: allenai/allennlp
Commit Name: e5a33d9ef0c72a8e6d81c4de06b51ab430008ed3
Time: 2017-08-24
Author: joelgrus@gmail.com
File Name: allennlp/training/metrics/span_based_f1_measure.py
Class Name: SpanBasedF1Measure
Method Name: __call__


Project Name: allenai/allennlp
Commit Name: e5a33d9ef0c72a8e6d81c4de06b51ab430008ed3
Time: 2017-08-24
Author: joelgrus@gmail.com
File Name: allennlp/training/metrics/f1_measure.py
Class Name: F1Measure
Method Name: __call__