Forward() missing 1 required positional argument

I am running this github code:

I had to change the forward functions to static methods because that’s what new Pytorch requires I believe. But I get the following error:

forward() missing 1 required positional argument: ‘lmax’.

Yet, I am passing in lmax. What is going wrong. You can see the code in the github repo.

The linked notebook seems to have created a valid output or are you using another version of the notebook?

PS: Don’t manually call model.forward, but instead the model directly via output = model(x), as otherwise e.g. registered hooks won’t be called.