ff09708034d6914e2e110212ebf182ee802c2d8a,nussl/ml/train/loss.py,DeepClusteringLoss,forward,#DeepClusteringLoss#Any#Any#Any#,80
Before Change
batch_size, -1).sum(dim=-1)
yTy = ((assignments.transpose(2, 1) @ assignments) ** 2).reshape(
batch_size, -1).sum(dim=-1)
loss = (vTv - 2 * vTy + yTy) / (vTv + yTy).detach()
return loss.mean()
class PermutationInvariantLoss(nn.Module):
After Change
assignments = assignments.view(batch_size, -1, num_sources)
assignments = nn.functional.normalize(assignments, dim=-1, p=2)
norm = (((weights.reshape(batch_size, -1)) ** 2).sum(dim=1) ** 2)+ 1e-8
assignments = weights * assignments
embedding = weights * embedding
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: interactiveaudiolab/nussl
Commit Name: ff09708034d6914e2e110212ebf182ee802c2d8a
Time: 2020-03-09
Author: prem@u.northwestern.edu
File Name: nussl/ml/train/loss.py
Class Name: DeepClusteringLoss
Method Name: forward
Project Name: uber/pyro
Commit Name: d7148f390db12a3f7e4b43ab584648b2e4a1882d
Time: 2020-11-07
Author: fritz.obermeyer@gmail.com
File Name: pyro/distributions/spanning_tree.py
Class Name: SpanningTree
Method Name: log_partition_function
Project Name: PacktPublishing/Deep-Reinforcement-Learning-Hands-On
Commit Name: 8d52bd0b09152b02e0a5504d33593d0c290b88c7
Time: 2018-02-05
Author: max.lapan@gmail.com
File Name: ch14/06_train_d4pg.py
Class Name:
Method Name: