Skip to content

Commit

Permalink
fixed prototype norm in swav (#249)
Browse files Browse the repository at this point in the history
  • Loading branch information
DonkeyShot21 authored Jun 4, 2022
1 parent 4d86dc9 commit 16183cf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions solo/methods/swav.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ def __init__(
self.prototypes = nn.utils.weight_norm(
nn.Linear(proj_output_dim, num_prototypes, bias=False)
)
self.prototypes.weight_g.data.fill_(1) # type: ignore
self.prototypes.weight_g.requires_grad = False

@staticmethod
def add_model_specific_args(parent_parser: argparse.ArgumentParser) -> argparse.ArgumentParser:
Expand Down

0 comments on commit 16183cf

Please sign in to comment.