dgcnz / dl2

Code for "Effect of equivariance on training dynamics"
1 stars 0 forks source link

Vectorize rgroup get_weight_constraint #72

Closed dgcnz closed 1 month ago

dgcnz commented 1 month ago

I'm too lazy to switch branches right now but this is the solution for (num_filter_banks, groups):

    def get_weight_constraint(w: torch.Tensor):
        w = w.unsqueeze(2)
        return torch.triu(w - w.transpose(1, 2)).abs().sum()
dgcnz commented 1 month ago

@Nesta-gitU

dgcnz commented 1 month ago

done