Solved by KFrank in post #2 
              
              
                Hi Muppet! 

Speaking as a non-expert, I would think that 
rewards = torch.as_tensor (rewards, dtype = torch.float, device = torch.device('cuda'))

would be the way to go.  I believe that pytorch will “no-op” any 
unneeded casts. 
Note, if rewards starts out as, for example, a numpy double array 
(a…