Solved by ptrblck in post #4 
              
              
                The AttributeError is raised, as you’ve most likely forgotten to add the super().__init__() call into the __init__ method. 

Yes, I would try to avoid using other libraries if possible, since you would break the computation graph and PyTorch won’t be able to track these operations. If really necessa…