I am following this:
https://pytorch.org/docs/master/notes/extending.html 25
and this:
https://pytorch.org/docs/master/autograd.html#torch.autograd.Function.forward 28
I guess the secret first argument ctx of forward and backward is not a class instance but something called context. I think you forced me to learn something about Python, so thank you  So though my code runs fine, it is suggestive of the wrong thing to call that argument self.
I haven’t seen any documentation that you can re-implement backward at the level of an nn.Module rather than a torch.autograd.Function.