Skip to content

Commit

Permalink
reformating
Browse files Browse the repository at this point in the history
  • Loading branch information
Hananel-Hazan committed May 19, 2021
1 parent 159cabe commit 97b5350
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions bindsnet/learning/learning.py
Original file line number Diff line number Diff line change
Expand Up @@ -552,13 +552,17 @@ def _connection_update(self, **kwargs) -> None:
# Initialize eligibility, P^+, and P^-.
if not hasattr(self, "p_plus"):
self.p_plus = torch.zeros(
#batch_size, *self.source.shape, device=self.source.s.device
batch_size, self.source.n, device=self.source.s.device
# batch_size, *self.source.shape, device=self.source.s.device
batch_size,
self.source.n,
device=self.source.s.device,
)
if not hasattr(self, "p_minus"):
self.p_minus = torch.zeros(
# batch_size, *self.target.shape, device=self.target.s.device
batch_size, self.target.n, device=self.target.s.device
batch_size,
self.target.n,
device=self.target.s.device,
)
if not hasattr(self, "eligibility"):
self.eligibility = torch.zeros(
Expand Down

0 comments on commit 97b5350

Please sign in to comment.