Skip to content
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

Conv ProcessModels Ignore weight_exp Parameter #803

Open
Gavinator98 opened this issue Oct 24, 2023 · 1 comment
Open

Conv ProcessModels Ignore weight_exp Parameter #803

Gavinator98 opened this issue Oct 24, 2023 · 1 comment
Assignees
Labels
0-needs-review For all new issues 1-bug Something isn't working

Comments

@Gavinator98
Copy link
Contributor

Describe the bug
The conv process specifies a weight_exp parameter to scale the weights by a power of 2, similar to the dense process. The NcProcessModel (and seemingly all of the other Conv process models) do not utilize this weight_exp.

To reproduce current behavior

Specify a weight_exp

Conv(weight=np.ones((3, 1, 1, 3)), weight_exp=4)

Expected behavior
Weights are scaled by weight_exp when applied.

Environment (please complete the following information):

  • Device: Intel Cloud
  • OS: Linux
  • Lava version 0.8.0
  • Lava for Loihi version 0.5.0
@Gavinator98 Gavinator98 added the 1-bug Something isn't working label Oct 24, 2023
@github-actions github-actions bot added the 0-needs-review For all new issues label Oct 24, 2023
@Gavinator98
Copy link
Contributor Author

One alternative to having a weight_exp parameter in the Process could be to have the optimize_weight_bits take in floating point inputs and let it compute the weight_exp automatically. This line:

weights = weights.astype(np.int32) << int(-weight_exp)
would need to be changed to something like:

weights = np.round(weights * 2**(-weight_exp)).astype(np.int32)

to prevent the weights from being unnecessarily truncated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0-needs-review For all new issues 1-bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants