Skip to content

Commit 201cb2a

Browse files
NicolasHugfacebook-github-bot
authored andcommitted
[fbsync] Fix missing f-string prefix in error message (#6684)
Summary: Co-authored-by: Nicolas Hug <[email protected]> Reviewed By: datumbox Differential Revision: D40138730 fbshipit-source-id: 09187f46ea50364f9374eee0f4e58ae7bb5bf146
1 parent 8d030f9 commit 201cb2a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

torchvision/models/detection/roi_heads.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -746,7 +746,7 @@ def forward(
746746
if not t["boxes"].dtype in floating_point_types:
747747
raise TypeError(f"target boxes must of float type, instead got {t['boxes'].dtype}")
748748
if not t["labels"].dtype == torch.int64:
749-
raise TypeError("target labels must of int64 type, instead got {t['labels'].dtype}")
749+
raise TypeError(f"target labels must of int64 type, instead got {t['labels'].dtype}")
750750
if self.has_keypoint():
751751
if not t["keypoints"].dtype == torch.float32:
752752
raise TypeError(f"target keypoints must of float type, instead got {t['keypoints'].dtype}")

0 commit comments

Comments
 (0)