47a96974ab2d75fc20c76a6d6da20976ecad32bb,gpytorch/random_variables/random_variable.py,RandomVariable,cuda,#RandomVariable#Any#,22

Before Change


        representation = self.representation()
        if not isinstance(representation, tuple) or isinstance(representation, list):
            representation = representation,
        return self.__class__(*(var.cuda(device_id) for var in representation))

    def covar(self):
        
        Returns the covariance of the random variable

After Change


        return self.__class__(*new_args, **new_kwargs)

    def cuda(self, device_id=None):
        new_args = []
        new_kwargs = {}
        for arg in self._args:
            if hasattr(arg, "cuda"):
                new_args.append(arg.cuda(device_id))
            else:
                new_args.append(arg)
        for name, val in self._kwargs.items():
            if hasattr(val, "cuda"):
                new_kwargs[name] = val.cuda(device_id)
            else:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

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: cuda


Project Name: scipy/scipy
Commit Name: bc889006b64e63457d81a496122463c57998f218
Time: 2015-01-17
Author: argriffi@ncsu.edu
File Name: scipy/sparse/linalg/dsolve/linsolve.py
Class Name:
Method Name: spsolve


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