3bd4db86630b75bbbfb6c5c0a1a85603097bf9b2,torchaudio/transforms.py,SPECTROGRAM,__call__,#SPECTROGRAM#Any#,200

Before Change


            c, n = sig.size()
            new_sig = sig.new_empty(c, n + self.pad * 2)
            new_sig[:, :self.pad].zero_()
            new_sig[:, -self.pad:].zero_()
            new_sig.narrow(1, self.pad, n).copy_(sig)
            sig = new_sig

        spec_f = torch.stft(sig, self.n_fft, self.hop, self.ws,
                            self.window, center=False,
                            normalized=True, onesided=True).transpose(1, 2)
        spec_f /= self.window.pow(2).sum().sqrt()
        spec_f = spec_f.pow(2).sum(-1)  // get power of "complex" tensor (c, l, n_fft)
        return spec_f if is_variable else spec_f.data


class F2M(object):
    This turns a normal STFT into a MEL Frequency STFT, using a conversion

After Change


                            normalized=True, onesided=True).transpose(1, 2)
        spec_f /= self.window.pow(2).sum().sqrt()
        spec_f = spec_f.pow(2).sum(-1)  // get power of "complex" tensor (c, l, n_fft)
        return spec_f


class F2M(object):
    This turns a normal STFT into a MEL Frequency STFT, using a conversion
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: pytorch/audio
Commit Name: 3bd4db86630b75bbbfb6c5c0a1a85603097bf9b2
Time: 2019-01-04
Author: david@da3.net
File Name: torchaudio/transforms.py
Class Name: SPECTROGRAM
Method Name: __call__


Project Name: elbayadm/attn2d
Commit Name: 2ad588856238aadd27120078810c742c490c4aac
Time: 2017-10-02
Author: myleott@fb.com
File Name: fairseq/data.py
Class Name: LanguagePairDataset
Method Name: __getitem__