dgcnz / relaxed-equivariance-dynamics

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

Vectorize rgroup get_weight_constraint #72

Closed dgcnz closed 3 months ago

dgcnz commented 4 months 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 4 months ago

@Nesta-gitU

dgcnz commented 3 months ago

done