186d078f6f9de9d7f50da14b29166b77290b93ca,nussl/ml/networks/modules.py,Embedding,forward,#Embedding#,229

Before Change


        shape = data.shape
        data = data.transpose(self.dim_to_embed, -1)
        data = self.linear(data)
        data = data.transpose(-1, self.dim_to_embed)

        shape = shape[:-1] + (
            self.num_features, self.num_audio_channels, self.embedding_size,)
        data = data.reshape(shape)

After Change


            data = data.transpose(_dim, -1)

        // the new shape doesn"t have the embedded dimensions
        shape = [
            v for i, v in enumerate(shape) 
            if i not in self.dim_to_embed
        ]
        
        shape = tuple(shape)
        data = data.reshape(shape + (-1,))
        data = self.linear(data)

        shape = shape + (
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: interactiveaudiolab/nussl
Commit Name: 186d078f6f9de9d7f50da14b29166b77290b93ca
Time: 2020-03-29
Author: prem@u.northwestern.edu
File Name: nussl/ml/networks/modules.py
Class Name: Embedding
Method Name: forward


Project Name: THUNLP-MT/THUMT
Commit Name: 62d2ea56ae4a090aa68baf133137982a836700bd
Time: 2018-01-25
Author: playinf@stu.xmu.edu.cn
File Name: thumt/layers/attention.py
Class Name:
Method Name: split_heads


Project Name: librosa/librosa
Commit Name: 2bae518e899657e536572fa59df6e1587795e397
Time: 2014-12-30
Author: brian.mcfee@nyu.edu
File Name: librosa/feature.py
Class Name:
Method Name: line_features