Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
fangwei123456 committed Apr 25, 2023
1 parent dbaa402 commit 5b587f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spikingjelly/activation_based/neuron.py
Original file line number Diff line number Diff line change
Expand Up @@ -1908,7 +1908,7 @@ def gen_masked_weight(k: float, mask0: torch.Tensor, mask1: torch.Tensor, weight

def masked_weight(self):
if self.k >= 1.:
return self.weight
return self.weight * self.mask0
else:
return self.gen_masked_weight(self.k, self.mask0, self.mask1, self.weight)

Expand Down

0 comments on commit 5b587f2

Please sign in to comment.