47a96974ab2d75fc20c76a6d6da20976ecad32bb,gpytorch/random_variables/random_variable.py,RandomVariable,cpu,#RandomVariable#,16
Before Change
def cpu(self):
representation = self.representation()
if not isinstance(representation, tuple) or isinstance(representation, list):
representation = representation,
return self.__class__(* (var.cpu() for var in representation))
def cuda(self, device_id=None):
representation = self.representation()
After Change
new_args.append(arg.cpu())
else:
new_args.append(arg)
for name, val in self._kwargs.items():
if hasattr(val, "cpu"):
new_kwargs[name] = val.cpu()
else:
new_kwargs[name] = val
return self.__class__(*new_args, **new_kwargs)
def cuda(self, device_id=None):
new_args = []
In pattern: SUPERPATTERN
Frequency: 5
Non-data size: 7
Instances Project Name: cornellius-gp/gpytorch
Commit Name: 47a96974ab2d75fc20c76a6d6da20976ecad32bb
Time: 2017-10-02
Author: gpleiss@gmail.com
File Name: gpytorch/random_variables/random_variable.py
Class Name: RandomVariable
Method Name: cpu
Project Name: dit/dit
Commit Name: 4e56081bc5cff4114c80cf755c696d807023afb9
Time: 2019-02-14
Author: ryangregoryjames@gmail.com
File Name: dit/pid/lattice.py
Class Name:
Method Name: pid_lattice
Project Name: cornellius-gp/gpytorch
Commit Name: 47a96974ab2d75fc20c76a6d6da20976ecad32bb
Time: 2017-10-02
Author: gpleiss@gmail.com
File Name: gpytorch/random_variables/random_variable.py
Class Name: RandomVariable
Method Name: cuda
Project Name: pantsbuild/pants
Commit Name: 09293d7e411b49133c6d20cc91c1d888e3b93308
Time: 2014-03-04
Author: wickman@twitter.com
File Name: src/python/twitter/pants/python/python_chroot.py
Class Name: PythonChroot
Method Name: dump
Project Name: markovmodel/PyEMMA
Commit Name: dbfe2afe79ac497075e50a3e569a1d63a346fb4d
Time: 2017-04-06
Author: m.scherer@fu-berlin.de
File Name: pyemma/_base/serialization/serialization.py
Class Name: SerializableMixIn
Method Name: _validate_interpolation_map