Open Gavinator98 opened 11 months ago
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: https://github.com/lava-nc/lava/blob/f7796e7571204b89f59ab4b61774942a736fbc99/src/lava/utils/weightutils.py#L80 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.
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
Expected behavior Weights are scaled by weight_exp when applied.
Environment (please complete the following information):