Solved by albanD in post #2 
              
              
                Hi, 
the problem is that you store your layers in a regular list, not an nn.ModuleList and so it is not affected by your call to model.cuda().