Thanks for the code. It still works on my machine with PyTorch 1.0.0.dev20181217 and Python3.7.
As far as I know, you would have to use the first super call with the class name and self in Python2.x.
Could this be the reason for the error you are getting?