Is there any way to convert saved weight data type from torch.FloatTensor to torch.HalfTensor

I trained the model in Dtype torch.cuda.FloatTensor, now I want to load the checkpoint and test in Dtype torch.cuda.HalfTensor.
Must I train the model again? or how can I conver checkpoint weight’s Dtype from float32 to float16


Similar question has been asked and discussed previously in these forums. You can have a look here.


thank you for your reply, I have solved this question by your link.