Forward() missing 1 required positional argument

I am running this github code: https://github.com/xbresson/spectral_graph_convnets/blob/master/02_graph_convnet_lenet5_mnist_pytorch.ipynb.

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.