you can do at the end of the __init__ function:
if torch.cuda.is_available():
    self.cuda()

instead of the multiple calls… However, I don’t know if it’s the source of the error.
EDIT: Also, probably it is not a good idea having an attribute with the same name a class method (self.cuda and self.cuda()).