(self, x, dropout=False, return_feat=False)
| 93 | self.lambd = lambd |
| 94 | |
| 95 | def forward(self, x, dropout=False, return_feat=False): |
| 96 | if return_feat: |
| 97 | return x |
| 98 | if self.norm: |
| 99 | x = F.normalize(x) |
| 100 | x = self.fc(x)/self.tmp |
| 101 | else: |
| 102 | x = self.fc(x) |
| 103 | return x |
| 104 | |
| 105 | def weight_norm(self): |
| 106 | w = self.fc.weight.data |
nothing calls this directly
no outgoing calls
no test coverage detected