RuntimeError: Expected object of scalar type Double but got scalar type Float for argument #2 'other' in call to _th_max

 File "/home/jake/venv/lib/python3.7/site-packages/torchvision/ops/boxes.py", line 153, in box_iou
    lt = torch.max(boxes1[:, None, :2], boxes2[:, :2])  # [N,M,2]
RuntimeError: Expected object of scalar type Double but got scalar type Float for argument #2 'other' in call to _th_max
annotations-> [{'boxes': tensor([[131.5124, 169.4232, 165.8235, 209.7217],
        [157.2659, 185.7604, 199.0850, 210.4478],
        [184.4726, 171.3594, 211.5178, 210.3267],
        [170.5867, 154.1751, 211.7600, 188.7858],
        [162.8364, 156.2324, 182.1313, 186.7285],
        [131.2702, 149.8185, 149.4349, 172.3276],
        [192.0614, 140.5002, 208.4500, 155.2642],
        [165.2583, 140.5002, 188.2670, 158.0476],
        [169.5371, 131.9080, 193.3531, 151.1497],
        [131.1895, 133.2392, 140.1507, 156.3534]], device='cuda:0',
       dtype=torch.float64), 'labels': tensor([1, 1, 1, 1, 1, 1, 1, 1, 1, 1], device='cuda:0'), 'area': tensor([1382.6857, 1032.4053, 1053.8795, 1425.0382,  588.4218,  408.8705,
         241.9614,  403.7413,  458.2574,  207.1317], device='cuda:0'), 'iscrowd': tensor([0, 0, 0, 0, 0, 0, 0, 0, 0, 0], device='cuda:0')}]

Based on the error message it seems that boxes1 contains float64 values, while boxes2 uses float32 values.
You would have to make sure to use the same data type for both tensors.
Depending which type you would like to keep you should either use:

boxes1 = boxes1.float()

or

boxes2 = boxes2.double()