is it possible to remove the dtype from tensor in pytorch?
targets-&gt; [{'boxes': tensor([[ 23.7296,  28.9209, 122.0997, 213.2374]], device='cuda:0',
       dtype=torch.float64), 'labels': tensor([1], device='cuda:0'), 'area': tensor([18131.2344], device='cuda:0'), 'iscrowd': tensor([0], device='cuda:0')}]

right now the boxes has the dtype=torch.float64 is it possible it just looks like 
targets-&gt; [{'boxes': tensor([[ 23.7296,  28.9209, 122.0997, 213.2374]], device='cuda:0',), 'labels': tensor([1], device='cuda:0'), 'area': tensor([18131.2344], device='cuda:0'), 'iscrowd': tensor([0], device='cuda:0')}]


All tensors have a dtype attribute, no exceptions. However, PyTorch has a default float dtype, usually torch.float32 (single precision 32bit floating point). When displaying tensors with this default dtype, it is omitted. However, your boxes tensor has a non-default dtype, torch.float64 and therefore it is being displayed.
You can use the .to() command to cast this tensor to the default torch.float32 dtype, and consequently make PyTorch not explicitly display the dtype:
targets[0]['boxes'] = targets[0]['boxes'].to(dtype=torch.float32)  #.to() in _not_ an in-place operation

This will result in

In [*]: targets
Out[*]:
[{'boxes': tensor([[ 23.7296,  28.9209, 122.0997, 213.2374]], device='cuda:0'),
  'labels': tensor([1], device='cuda:0'),
  'area': tensor([18131.2344], device='cuda:0'),
  'iscrowd': tensor([0], device='cuda:0')}]


