Solved by AnBucquet in post #2 
              
              
                Hi, 
Your tensor is a CUDA tensor so you can’t use matplotlib directly. 
try: 
plt.imshow(params[0][0].detach().cpu().numpy())

It should work