094c57ce94fc70c11032c08ae7322532b02e616b,scattering/scattering1d/backend/backend_torch.py,,pad,#Any#Any#Any#Any#,198
Before Change
if to_complex:
return torch.cat(
[output.unsqueeze(-1),
output.data.new(output.shape + (1,)).fill_(0.)],
dim=-1)
else:
return output
After Change
corresponds to the real and imaginary parts).
output = pad1D(x, pad_left, pad_right, mode="reflect")
if to_complex:
output = torch.stack((output, torch.zeros_like(output)), dim=-1)
return output
def unpad(x, i0, i1):
Unpad real 1D tensor
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 4
Instances
Project Name: kymatio/kymatio
Commit Name: 094c57ce94fc70c11032c08ae7322532b02e616b
Time: 2018-11-21
Author: janden@flatironinstitute.org
File Name: scattering/scattering1d/backend/backend_torch.py
Class Name:
Method Name: pad
Project Name: kymatio/kymatio
Commit Name: 094c57ce94fc70c11032c08ae7322532b02e616b
Time: 2018-11-21
Author: janden@flatironinstitute.org
File Name: scattering/scattering1d/backend/backend_skcuda.py
Class Name:
Method Name: pad
Project Name: pytorch/fairseq
Commit Name: c2165224d198450a3b4329ae099a772aa65d51c5
Time: 2019-10-08
Author: changhan@fb.com
File Name: fairseq/models/levenshtein_transformer.py
Class Name: LevenshteinTransformerModel
Method Name: forward_decoder