Thanks for your relay.
Here is my code:
print("tensors.dtype: ", tensors.dtype)   ->  tensors.dtype:  torch.float32
self.tensors = tensors
tensors.half()
print("tensors.dtype: ", tensors.dtype)   ->  tensors.dtype:  torch.float32  , not torch.float16
self.image_sizes = image_sizes
very confused!