Skip to content

Commit

Permalink
Correct spike-slab separation
Browse files Browse the repository at this point in the history
  • Loading branch information
suhasshrinivasan committed Aug 25, 2023
1 parent 3d73583 commit ac56731
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions neuralpredictors/measures/zero_inflated_losses.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ def forward(self, target, output, **kwargs):
if loc.requires_grad:
self.multi_clamp(loc, [0.0] * neurons_n, target.max(dim=0)[0])

zero_mask = target < loc
nonzero_mask = target >= loc
zero_mask = target <= loc
nonzero_mask = target > loc

# spike loss
spike_logl = torch.log(1 - q) - torch.log(loc)
Expand Down

0 comments on commit ac56731

Please sign in to comment.