1972461c3c06d11872cdf62941a616ee82c858a8,gpytorch/lazy/constant_mul_lazy_variable.py,ConstantMulLazyVariable,_constant_as,#ConstantMulLazyVariable#Any#,46
Before Change
if constant.ndimension() > other.ndimension():
constant = constant.squeeze(-1)
return constant.expand_as(other)
def _size(self):
return self.lazy_var.size()
After Change
return res
def _constant_as(self, other):
size = [self.constant.numel()] + [1] * (other.ndimension() - 1)
constant = self.constant.view(*size)
if constant.ndimension() > other.ndimension():
constant = constant.squeeze(-1)
return constant
def _size(self):
return self.lazy_var.size()
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: cornellius-gp/gpytorch
Commit Name: 1972461c3c06d11872cdf62941a616ee82c858a8
Time: 2018-08-17
Author: gpleiss@gmail.com
File Name: gpytorch/lazy/constant_mul_lazy_variable.py
Class Name: ConstantMulLazyVariable
Method Name: _constant_as
Project Name: kymatio/kymatio
Commit Name: e85afb81eb0296f3a98090138285af486d16cb72
Time: 2018-11-21
Author: zagoruyko2@gmail.com
File Name: scatwave/utils.py
Class Name: Modulus
Method Name: __call__
Project Name: edouardoyallon/pyscatwave
Commit Name: 0b6125783bebf10461102368adc8f325d380f934
Time: 2017-04-17
Author: zagoruyko2@gmail.com
File Name: scatwave/utils.py
Class Name: Modulus
Method Name: __call__