3bf391c2315bcec722961a2f4a093d1c516dbb10,art/classifiers/pytorch.py,PyTorchClassifier,__init__,#PyTorchClassifier#Any#Any#Any#Any#Any#Any#Any#Any#Any#,14

Before Change



        // Use GPU if possible
        import torch
        self._device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
        self._model.to(self._device)

    def predict(self, x, logits=False, batch_size=128):

After Change



        // Use GPU if possible
        import torch
        self._device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
        self._model.to(self._device)

    def predict(self, x, logits=False, batch_size=128):
        
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: IBM/adversarial-robustness-toolbox
Commit Name: 3bf391c2315bcec722961a2f4a093d1c516dbb10
Time: 2018-08-29
Author: Maria-Irina.Nicolae@ibm.com
File Name: art/classifiers/pytorch.py
Class Name: PyTorchClassifier
Method Name: __init__


Project Name: jindongwang/transferlearning
Commit Name: e6b394f7340cbeee16bf4424cdf0367f80b60619
Time: 2018-12-22
Author: jindongwang@outlook.com
File Name: code/deep/finetune_AlexNet_ResNet/office31.py
Class Name:
Method Name:


Project Name: ultralytics/yolov3
Commit Name: cfe354064cd599ae6ea902ffaa4dbd106d3a40fb
Time: 2019-04-21
Author: glenn.jocher@ultralytics.com
File Name: models.py
Class Name: YOLOLayer
Method Name: __init__