4f5bee81eeb9cecb9d040cb4436dd7f07e06b965,nussl/ml/networks/modules.py,AmplitudeToDB,forward,#AmplitudeToDB#Any#Any#Any#,24
Before Change
[type]: [description]
def forward(self, data, ref=1.0, amin=1e-4):
data = torch.abs(data) ** 2
amin = amin ** 2
ref = ref ** 2
data = 10.0 * torch.log10(torch.clamp(data, min=amin))
data -= 10.0 * np.log10(np.maximum(amin, ref))
return data
class BatchNorm(nn.Module):
After Change
def forward(self, data, ref=1.0, amin=1e-4):
data = data ** 2
amin = amin ** 2
ref = np.log10(np.maximum(amin, ref ** 2))
data = 10.0 * (torch.log10(torch.clamp(data, min=amin)) - ref)
return data
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: interactiveaudiolab/nussl
Commit Name: 4f5bee81eeb9cecb9d040cb4436dd7f07e06b965
Time: 2020-03-22
Author: prem@u.northwestern.edu
File Name: nussl/ml/networks/modules.py
Class Name: AmplitudeToDB
Method Name: forward
Project Name: librosa/librosa
Commit Name: bc1c204015ee40fd536f68c73854b9c131ff4524
Time: 2012-11-26
Author: brm2132@columbia.edu
File Name: librosa/beat.py
Class Name:
Method Name: _beat_strength
Project Name: tensorflow/cleverhans
Commit Name: 985c0de1dc22c69bdad163a8cd3a3ec4128657b2
Time: 2018-07-10
Author: krishnaphaniiitg@gmail.com
File Name: cleverhans/utils_tf.py
Class Name:
Method Name: clip_eta