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
This is not strictly speaking a bug, but at the moment torch.jit.script fails on the following
network with
RuntimeError:
Module 'LIF' has no attribute 'state_fallback' (This attribute exists on the Python module, but we failed to convert Python type: 'method' to a TorchScript type. Only tensors and (possibly nested) tuples of tensors, lists, or dictsare supported as inputs or outputs of traced functions, but instead got value of type method.. Its type was inferred; try adding a type annotation for the attribute.):
File "/home/cpehle/work/norse/norse/torch/module/snn.py", line 210
def forward(self, input_tensor: torch.Tensor, state: Optional[Any] = None):
state = state if state is not None else self.state_fallback(input_tensor)
~~~~~~~~~~~~~~~~~~~ <--- HERE
I think it is worthwhile changing the API so that this goes through. I will potentially need this in the near future to support hardware backends via this mechanism.
Describe the bug
This is not strictly speaking a bug, but at the moment
torch.jit.script
fails on the followingnetwork with
I think it is worthwhile changing the API so that this goes through. I will potentially need this in the near future to support hardware backends via this mechanism.
To Reproduce
Expected behavior
The module can be jitted.
The text was updated successfully, but these errors were encountered: