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
ModelZoo
ResNet50_tensorflow
Commits
ec31b3b9
Commit
ec31b3b9
authored
Jun 10, 2022
by
A. Unique TensorFlower
Committed by
TF Object Detection Team
Jun 10, 2022
Browse files
Since assertEquals is deprecated, updated assertEquals to assertEqual
PiperOrigin-RevId: 454241165
parent
d51d90a6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
research/object_detection/anchor_generators/multiple_grid_anchor_generator_test.py
.../anchor_generators/multiple_grid_anchor_generator_test.py
+3
-3
No files found.
research/object_detection/anchor_generators/multiple_grid_anchor_generator_test.py
View file @
ec31b3b9
...
@@ -151,7 +151,7 @@ class MultipleGridAnchorGeneratorTest(test_case.TestCase):
...
@@ -151,7 +151,7 @@ class MultipleGridAnchorGeneratorTest(test_case.TestCase):
[.
125
-
.
5
*
h
,
.
125
-
.
5
*
w
,
.
125
+
.
5
*
h
,
.
125
+
.
5
*
w
],]
[.
125
-
.
5
*
h
,
.
125
-
.
5
*
w
,
.
125
+
.
5
*
h
,
.
125
+
.
5
*
w
],]
anchor_corners_out
=
np
.
concatenate
(
self
.
execute
(
graph_fn
,
[]),
axis
=
0
)
anchor_corners_out
=
np
.
concatenate
(
self
.
execute
(
graph_fn
,
[]),
axis
=
0
)
self
.
assertEqual
s
(
anchor_corners_out
.
shape
,
(
56
,
4
))
self
.
assertEqual
(
anchor_corners_out
.
shape
,
(
56
,
4
))
big_grid_corners
=
anchor_corners_out
[
0
:
3
,
:]
big_grid_corners
=
anchor_corners_out
[
0
:
3
,
:]
small_grid_corners
=
anchor_corners_out
[
48
:,
:]
small_grid_corners
=
anchor_corners_out
[
48
:,
:]
self
.
assertAllClose
(
small_grid_corners
,
exp_small_grid_corners
)
self
.
assertAllClose
(
small_grid_corners
,
exp_small_grid_corners
)
...
@@ -268,7 +268,7 @@ class CreateSSDAnchorsTest(test_case.TestCase):
...
@@ -268,7 +268,7 @@ class CreateSSDAnchorsTest(test_case.TestCase):
feature_map_shape_list
=
feature_map_shape_list
)
feature_map_shape_list
=
feature_map_shape_list
)
return
[
anchors
.
get
()
for
anchors
in
anchors_list
]
return
[
anchors
.
get
()
for
anchors
in
anchors_list
]
anchor_corners_out
=
np
.
concatenate
(
self
.
execute
(
graph_fn1
,
[]),
axis
=
0
)
anchor_corners_out
=
np
.
concatenate
(
self
.
execute
(
graph_fn1
,
[]),
axis
=
0
)
self
.
assertEqual
s
(
anchor_corners_out
.
shape
,
(
7308
,
4
))
self
.
assertEqual
(
anchor_corners_out
.
shape
,
(
7308
,
4
))
def
graph_fn2
():
def
graph_fn2
():
anchor_generator
=
ag
.
create_ssd_anchors
(
anchor_generator
=
ag
.
create_ssd_anchors
(
...
@@ -282,7 +282,7 @@ class CreateSSDAnchorsTest(test_case.TestCase):
...
@@ -282,7 +282,7 @@ class CreateSSDAnchorsTest(test_case.TestCase):
feature_map_shape_list
=
feature_map_shape_list
)
feature_map_shape_list
=
feature_map_shape_list
)
return
[
anchors
.
get
()
for
anchors
in
anchors_list
]
return
[
anchors
.
get
()
for
anchors
in
anchors_list
]
anchor_corners_out
=
np
.
concatenate
(
self
.
execute
(
graph_fn2
,
[]),
axis
=
0
)
anchor_corners_out
=
np
.
concatenate
(
self
.
execute
(
graph_fn2
,
[]),
axis
=
0
)
self
.
assertEqual
s
(
anchor_corners_out
.
shape
,
(
11640
,
4
))
self
.
assertEqual
(
anchor_corners_out
.
shape
,
(
11640
,
4
))
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
...
...
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