7b34113cc3b5529a127bd02667de9de0b5b75df9,models/networks_basic.py,PNet,forward,#PNet#Any#Any#Any#,40

Before Change


            if(kk==0):
                val = 1.*cur_score
            else:
                val = val + cur_score
            if(retPerLayer):
                all_scores+=[cur_score]

        if(retPerLayer):
            return (val, all_scores)
        else:
            return val

// Learned perceptual metric
class PNetLin(nn.Module):
    def __init__(self, pnet_type="vgg", pnet_rand=False, pnet_tune=False, use_dropout=True, spatial=False, version="0.1"):

After Change


        elif(self.colorspace=="Lab"):
            value = util.dssim(util.tensor2np(util.tensor2tensorlab(in0.data,to_norm=False)), 
                util.tensor2np(util.tensor2tensorlab(in1.data,to_norm=False)), range=100.).astype("float")
        ret_var = Variable( torch.Tensor((value,) ) )
        if(self.use_gpu):
            ret_var = ret_var.cuda()
        return ret_var

def print_network(net):
    num_params = 0
    for param in net.parameters():
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 4

Instances


Project Name: richzhang/PerceptualSimilarity
Commit Name: 7b34113cc3b5529a127bd02667de9de0b5b75df9
Time: 2019-07-26
Author: rich.zhang@eecs.berkeley.edu
File Name: models/networks_basic.py
Class Name: PNet
Method Name: forward


Project Name: cornellius-gp/gpytorch
Commit Name: edf128e58f813be159d70f48298cb101c4c0cf1b
Time: 2017-07-03
Author: jrg365@cornell.edu
File Name: gpytorch/random_variables/__init__.py
Class Name: IndependentRandomVariables
Method Name: log_probability


Project Name: rusty1s/pytorch_geometric
Commit Name: db28ee240981457335c6fd9c38e542066df214cb
Time: 2020-02-19
Author: matthias.fey@tu-dortmund.de
File Name: examples/cluster_gcn.py
Class Name:
Method Name: test


Project Name: naoto0804/pytorch-inpainting-with-partial-conv
Commit Name: c9159b91e20a36766aafe4d6fcd8c8e8041f1b66
Time: 2018-06-04
Author: inoue@hal.t.u-tokyo.ac.jp
File Name: util/image.py
Class Name:
Method Name: unnormalize