5e82853bb435e7c46e2e3bafa2c1d0a4c40ffb38,dvalib/indexer.py,BaseIndexer,apply,#BaseIndexer#Any#,20

Before Change


        tensor = self.transform(PIL.Image.open(path).convert("RGB")).unsqueeze_(0)
        if torch.cuda.is_available():
            tensor = torch.FloatTensor(tensor).cuda()
        return self.net(Variable(tensor)).data.numpy()

    def load_index(self,path):
        temp_index = []
        for dirname in os.listdir(path +"/"):

After Change


        if torch.cuda.is_available():
            tensor = torch.FloatTensor(tensor).cuda()
        result = self.net(Variable(tensor))
        if torch.cuda.is_available():
            result = result.data.cpu()
        return result.data.numpy()

    def load_index(self,path):
        temp_index = []
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: AKSHAYUBHAT/DeepVideoAnalytics
Commit Name: 5e82853bb435e7c46e2e3bafa2c1d0a4c40ffb38
Time: 2017-02-03
Author: AKSHAYUBHAT@GMAIL.COM
File Name: dvalib/indexer.py
Class Name: BaseIndexer
Method Name: apply


Project Name: ray-project/ray
Commit Name: d9f1874e3489edc915228dcfdae64d5294034464
Time: 2020-10-27
Author: sven@anyscale.io
File Name: rllib/agents/pg/tests/test_pg.py
Class Name: TestPG
Method Name: test_pg_loss_functions


Project Name: microsoft/nni
Commit Name: e6ef08f367e0389e811d63eaa5afb16183a19e2b
Time: 2020-08-24
Author: 40699903+liuzhe-lz@users.noreply.github.com
File Name: src/sdk/pynni/nni/compression/tensorflow/compressor.py
Class Name: PrunerLayerWrapper
Method Name: call