Skip to content

Fix: bug with clamp operation on Alpha neuron #370

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

dylanperdigao
Copy link
Contributor

There was a problem with the Alpha neuron; the clamp operation could not be performed on an nn.Parameter on GPU. To correct this, the clamp operation was performed before and is now working.

The error was:

    return Alpha(
  File "XXXX/.local/lib/python3.10/site-packages/snntorch/_neurons/alpha.py", line 119, in __init__
    self._alpha_register_buffer(alpha, learn_alpha)
  File "XXXX/.local/lib/python3.10/site-packages/snntorch/_neurons/alpha.py", line 252, in _alpha_register_buffer
    self.register_buffer("alpha", alpha)
  File "XXXX/.local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1715, in __setattr__
    raise TypeError(f"cannot assign '{torch.typename(value)}' as parameter '{name}' "
TypeError: cannot assign 'torch.FloatTensor' as parameter 'alpha' (torch.nn.Parameter or None expected)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant