Skip to content

Commit

Permalink
fix allocation problem
Browse files Browse the repository at this point in the history
  • Loading branch information
atenagm1375 committed Mar 24, 2021
1 parent 2715651 commit 47b9376
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cnsproject/network/neural_populations.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def __init__(
self.additive_spike_trace = additive_spike_trace

if self.spike_trace:
self.register_buffer("traces", torch.Tensor())
self.register_buffer("traces", torch.zeros(*self.shape))
self.register_buffer("tau_s", torch.tensor(tau_s))

if self.additive_spike_trace:
Expand All @@ -68,7 +68,7 @@ def __init__(
self.is_inhibitory = is_inhibitory
self.learning = learning

self.register_buffer("s", torch.ByteTensor())
self.register_buffer("s", torch.zeros(*self.shape, dtype=torch.bool))
self.dt = None

@abstractmethod
Expand Down

0 comments on commit 47b9376

Please sign in to comment.