020d3d6dfa1bbcc13f7f7f0a833f57bb2cc8ef9d,gpytorch/lazy/constant_mul_lazy_variable.py,ConstantMulLazyVariable,__init__,#ConstantMulLazyVariable#Any#Any#,12
 
Before Change
class ConstantMulLazyVariable(LazyVariable):
    def __init__(self, lazy_var, constant):
        if not isinstance(constant, Variable):
            tensor_cls = lazy_var.tensor_cls
            constant = Variable(tensor_cls(1).fill_(constant))
        super(ConstantMulLazyVariable, self).__init__(lazy_var, constant)
        self.lazy_var = lazy_var
        self.constant = constant
After Change
class ConstantMulLazyVariable(LazyVariable):
    def __init__(self, lazy_var, constant):
        if torch.is_tensor(constant):
            constant = constant
        else:
            constant = torch.Tensor([constant], device=lazy_var.device)
        super(ConstantMulLazyVariable, self).__init__(lazy_var, constant)
        self.lazy_var = lazy_var
        self.constant = constant

In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 7
Instances
 Project Name: cornellius-gp/gpytorch
 Commit Name: 020d3d6dfa1bbcc13f7f7f0a833f57bb2cc8ef9d
 Time: 2018-07-03
 Author: balandat@fb.com
 File Name: gpytorch/lazy/constant_mul_lazy_variable.py
 Class Name: ConstantMulLazyVariable
 Method Name: __init__
 Project Name: cornellius-gp/gpytorch
 Commit Name: 74db1a184a17bee6e658851d924c45740888f84a
 Time: 2018-06-29
 Author: ss3765@cornell.edu
 File Name: gpytorch/lazy/constant_mul_lazy_variable.py
 Class Name: ConstantMulLazyVariable
 Method Name: __init__
 Project Name: open-mmlab/mmdetection
 Commit Name: 22e2caf69681359e0b0a16ce2594c5cbe825c6d4
 Time: 2019-01-21
 Author: yhcao6@gmail.com
 File Name: mmdet/ops/dcn/modules/deform_conv.py
 Class Name: ModulatedDeformConv
 Method Name: __init__