e304d4ee794a4cca8c116e52f99077ee71f87af1,mushroom/approximators/parametric/pytorch_network.py,PyTorchApproximator,predict,#PyTorchApproximator#,62
Before Change
val = self._network.forward(*torch_args, **kwargs).detach().numpy()
else:
torch_args = [torch.from_numpy(x).cuda() for x in args]
val = self._network.forward(*torch_args,
**kwargs).detach().cpu().numpy()
return val
def fit(self, *args, **kwargs):
After Change
if isinstance(val, tuple):
val = tuple([x.detach().cpu().numpy() for x in val])
else:
val = val.detach().cpu().numpy()
return val
def fit(self, *args, **kwargs):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
Instances Project Name: AIRLab-POLIMI/mushroom
Commit Name: e304d4ee794a4cca8c116e52f99077ee71f87af1
Time: 2018-09-03
Author: carloderamo@gmail.com
File Name: mushroom/approximators/parametric/pytorch_network.py
Class Name: PyTorchApproximator
Method Name: predict
Project Name: Scitator/catalyst
Commit Name: 685bf12edbaf20d969dc28549e634c9fa4993f5f
Time: 2018-10-14
Author: ngxbac.dt@gmail.com
File Name: dl/callbacks.py
Class Name: IOUCallback
Method Name: on_batch_end
Project Name: IBM/adversarial-robustness-toolbox
Commit Name: e21ef336207b0f9ae378c77430d298945827830a
Time: 2019-02-12
Author: M.N.Tran@ibm.com
File Name: art/classifiers/pytorch.py
Class Name: PyTorchClassifier
Method Name: get_activations