Hello,
When forward takes three params, autograd expects backward to return three parameters, even if weights is not intended to be differentiable. Thus you would want to return another None.
Is there a reason to not use a python class properly?
Best regards
Thomas