Hi,
I am afraid this code is several years old and was written for a very old version of pytorch. This feature (and most likely many others) are not supported anymore and you will need to update the code if you want to run it with the latest version of pytorch.