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
46f6083b
Unverified
Commit
46f6083b
authored
Nov 06, 2020
by
Aditya Oke
Committed by
GitHub
Nov 06, 2020
Browse files
Changes to assert to ValueError in achor utils (#2960)
* changes to value error * fixes it :) * simpler fix
parent
7f7ff056
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
torchvision/models/detection/anchor_utils.py
torchvision/models/detection/anchor_utils.py
+6
-1
No files found.
torchvision/models/detection/anchor_utils.py
View file @
46f6083b
...
...
@@ -100,7 +100,12 @@ class AnchorGenerator(nn.Module):
anchors
=
[]
cell_anchors
=
self
.
cell_anchors
assert
cell_anchors
is
not
None
assert
len
(
grid_sizes
)
==
len
(
strides
)
==
len
(
cell_anchors
)
if
not
(
len
(
grid_sizes
)
==
len
(
strides
)
==
len
(
cell_anchors
)):
raise
ValueError
(
"Achors should be Tuple[Tuple[int]] because each feature "
"map could potentially have different sizes and aspect ratios. "
"There needs to be a match between the number of "
"feature maps passed and the number of sizes / aspect ratios specified."
)
for
size
,
stride
,
base_anchors
in
zip
(
grid_sizes
,
strides
,
cell_anchors
...
...
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