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 .data attribute is discouraged as it might yield unexpected side effects.
Instead you should wrap the assignment in a with torch.no_grad() block and directly assign new nn.Parameters.