Solved by ptrblck in post #4 
              
              
                The error points towards a device mismatch: 
RuntimeError: Expected object of device type cuda but got device type cpu for argument #1 'self' in call to _th_mm

amp needs a GPU to run properly, so you would need to call .to('cuda') on the model and input. 
Also, you might need to register self.n_ as…