Solved by ptrblck in post #2 
              
              
                Numpy uses float64 as the default data type. If you load or create an array without changing this dtype, torch.from_numpy() will respect the dtype and will also return a DoubleTensor. 
You should solve this issue by using: 
param = torch.from_numpy(un_params[count][0]).float()

PS: the usage of the .…