Solved by ptrblck in post #4 
              
              
                Hi Sarra, 
could you use a translation service, please, as my French is quite bad?  
From Deepl: 

“or I add ( tensor = torch.from_numpy(array)) ? in the source code please ?” 

If I understand it correctly, you would like to know, where to add this line of code? 
Try to add it right before the .cud…