2154d789ef0d79debe2cc522751ae7072e8b22dc,torchsample/modules/super_module.py,SuperModule,predict_loader,#SuperModule#Any#Any#Any#,475

Before Change


            x_batch = Variable(batch)
            if cuda_device is not None:
                x_batch = x_batch.cuda(cuda_device)
            batch_pred = self(x_batch)
            preds.append(batch_pred.data)
        self.train()
        return Variable(torch.cat(preds))

After Change


                batch_data = [batch_data]
            input_batch = batch_data[0]
            if not isinstance(input_batch, (list,tuple)):
                input_batch = [input_batch]
            input_batch = [Variable(ins) for ins in input_batch]
            if cuda_device > -1:
                input_batch = [ins.cuda(cuda_device) for ins in input_batch]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: ncullen93/torchsample
Commit Name: 2154d789ef0d79debe2cc522751ae7072e8b22dc
Time: 2017-04-28
Author: ncullen@modv-vlan533.0527.apn.wlan.wireless-pennnet.upenn.edu
File Name: torchsample/modules/super_module.py
Class Name: SuperModule
Method Name: predict_loader


Project Name: stellargraph/stellargraph
Commit Name: 6224fa670c6bac8b82ae8889cb01ae73a4a5e8d1
Time: 2019-01-24
Author: wangzhen263@gmail.com
File Name: stellargraph/layer/gcn.py
Class Name: GCN
Method Name: node_model


Project Name: Theano/Theano
Commit Name: 4341134543ed367b3b5c1885efd8199a66a0ce3f
Time: 2017-01-30
Author: gvtulder@gmail.com
File Name: theano/sandbox/cuda/dnn.py
Class Name: GpuDnnBatchNorm
Method Name: grad