6d781d6720bcaeb5aa75874180e5d636e9f4248f,scattering/scattering1d/backend/backend_torch.py,,modulus_complex,#Any#,250

Before Change


    
    // take the stable modulus
    real = modulus(x)
    imag = real.data.new(real.shape).fill_(0.)
    res = torch.cat([real.unsqueeze(-1), imag.unsqueeze(-1)], dim=-1)
    return res


After Change


    // take the stable modulus
    norm = modulus(x)

    res = torch.zeros_like(x)
    res[...,0] = norm

    return res
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: kymatio/kymatio
Commit Name: 6d781d6720bcaeb5aa75874180e5d636e9f4248f
Time: 2018-11-21
Author: janden@flatironinstitute.org
File Name: scattering/scattering1d/backend/backend_torch.py
Class Name:
Method Name: modulus_complex


Project Name: interactiveaudiolab/nussl
Commit Name: fa6f47e7aee228226421c52e61cce4e1ab4cc099
Time: 2020-03-15
Author: prem@u.northwestern.edu
File Name: tests/ml/test_loss.py
Class Name:
Method Name: test_permutation_invariant_loss_tf


Project Name: facebookresearch/ParlAI
Commit Name: 548c67bbe7598c3221b83cf6ef216b848debac2c
Time: 2018-11-15
Author: roller@fb.com
File Name: parlai/agents/seq2seq/modules.py
Class Name: OutputLayer
Method Name: forward