Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
vision
Commits
344ccc05
Unverified
Commit
344ccc05
authored
Oct 04, 2022
by
Robert Perrotta
Committed by
GitHub
Oct 04, 2022
Browse files
Fix missing f-string prefix in error message (#6684)
Co-authored-by:
Nicolas Hug
<
contact@nicolas-hug.com
>
parent
e89f639f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
torchvision/models/detection/roi_heads.py
torchvision/models/detection/roi_heads.py
+1
-1
No files found.
torchvision/models/detection/roi_heads.py
View file @
344ccc05
...
...
@@ -746,7 +746,7 @@ class RoIHeads(nn.Module):
if
not
t
[
"boxes"
].
dtype
in
floating_point_types
:
raise
TypeError
(
f
"target boxes must of float type, instead got
{
t
[
'boxes'
].
dtype
}
"
)
if
not
t
[
"labels"
].
dtype
==
torch
.
int64
:
raise
TypeError
(
"target labels must of int64 type, instead got {t['labels'].dtype}"
)
raise
TypeError
(
f
"target labels must of int64 type, instead got
{
t
[
'labels'
].
dtype
}
"
)
if
self
.
has_keypoint
():
if
not
t
[
"keypoints"
].
dtype
==
torch
.
float32
:
raise
TypeError
(
f
"target keypoints must of float type, instead got
{
t
[
'keypoints'
].
dtype
}
"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment