5f0a67ce3c2d01a2da19b18f2f0834bb31c35182,kymatio/scattering2d/backend/backend_skcuda.py,Pad,__call__,#Pad#Any#,49
Before Change
def __call__(self, input):
if(self.pre_pad):
output = input.new_zeros(input.size(0), input.size(1), input.size(2), input.size(3), 2)
output.narrow(output.ndimension()-1, 0, 1)[:] = input
else:
out_ = self.padding_module(input)
output = input.new_zeros(*(out_.size() + (2,)))
After Change
self.padding_module = ReflectionPad2d(self.pad_size)
def __call__(self, x):
if not self.pre_pad:
x = self.padding_module(x)
output = x.new_zeros(x.shape + (2,))
output[...,0] = x
return output
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 6
Instances
Project Name: kymatio/kymatio
Commit Name: 5f0a67ce3c2d01a2da19b18f2f0834bb31c35182
Time: 2019-03-02
Author: edouard.oyallon@centralesupelec.fr
File Name: kymatio/scattering2d/backend/backend_skcuda.py
Class Name: Pad
Method Name: __call__
Project Name: elbayadm/attn2d
Commit Name: 3dcb5c77165c1a0c33a35a7831182f1aa2e8ad73
Time: 2019-10-18
Author: changhan@fb.com
File Name: fairseq/models/model_utils.py
Class Name:
Method Name: fill_tensors
Project Name: kymatio/kymatio
Commit Name: 5f0a67ce3c2d01a2da19b18f2f0834bb31c35182
Time: 2019-03-02
Author: edouard.oyallon@centralesupelec.fr
File Name: kymatio/scattering2d/backend/backend_torch.py
Class Name: Pad
Method Name: __call__