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
torch_args = [torch.from_numpy(x).cuda() for x in args]
val = self._network.forward(*torch_args,
**kwargs)
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):
if self._dropout:
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: tensorflow/tpu
Commit Name: 58086fa0a4fdd7c72a9ca51746a754fbd6644b91
Time: 2019-08-06
Author: gardener@tensorflow.org
File Name: models/common/distributed_executor.py
Class Name: DistributedExecutor
Method Name: _run_evaluation
Project Name: tensorflow/tpu
Commit Name: 0789cc08dd92a43422469fc4973ecc972d032421
Time: 2019-08-06
Author: yeqing@google.com
File Name: models/common/distributed_executor.py
Class Name: DistributedExecutor
Method Name: _run_evaluation