You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to get adaptive threshold, but why the backpropagation threshold has no gradient, who can help me?
class ALIFNode(neuron.BaseNode):
def init(self, tau: torch.Tensor, v_threshold: float = 1.0, *args, **kwargs):
super().init(*args, **kwargs)
self.v_threshold = torch.nn.Parameter(torch.tensor(v_threshold, dtype=torch.float32, requires_grad=True))
if not isinstance(tau, torch.Tensor):
tau = torch.tensor(tau, dtype=torch.float32)
self.register_buffer('tau', tau)
self.v_reset = torch.tensor(0.0) # Assuming a reset value, you might need to adjust this
I want to get adaptive threshold, but why the backpropagation threshold has no gradient, who can help me?
class ALIFNode(neuron.BaseNode):
def init(self, tau: torch.Tensor, v_threshold: float = 1.0, *args, **kwargs):
super().init(*args, **kwargs)
self.v_threshold = torch.nn.Parameter(torch.tensor(v_threshold, dtype=torch.float32, requires_grad=True))
if not isinstance(tau, torch.Tensor):
tau = torch.tensor(tau, dtype=torch.float32)
self.register_buffer('tau', tau)
self.v_reset = torch.tensor(0.0) # Assuming a reset value, you might need to adjust this
The text was updated successfully, but these errors were encountered: