2154d789ef0d79debe2cc522751ae7072e8b22dc,torchsample/modules/super_module.py,SuperModule,predict_on_batch,#SuperModule#Any#Any#,492

Before Change


        if cuda_device > 0:
            x = x.cuda(cuda_device)
        preds = self(x)
        self.train()
        return preds

    def evaluate(self, 
                 inputs, 

After Change


    def predict_on_batch(self, 
                         inputs, 
                         cuda_device=-1):
        if not isinstance(inputs, (list,tuple)):
            inputs = [inputs]
        if cuda_device > -1:
            inputs = [ins.cuda(cuda_device) for ins in inputs]
        preds = self(*inputs)
        return preds
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

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_on_batch


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: pyannote/pyannote-audio
Commit Name: 0cd793984ffa7f7bbedaafddb5ade7c11886a38a
Time: 2017-09-25
Author: bredin@limsi.fr
File Name: pyannote/audio/applications/feature_extraction.py
Class Name:
Method Name: extract