Solved by tom in post #2 
              
              
                Static methods are methods not attached to a particular instance - so they do take a self as first argument. They’re not PyTorch-specific but a general Python thing: 
https://docs.python.org/3.5/library/functions.html#staticmethod 
PyTorch’s autograd Functions store state in a special context object…