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
3ea57553
Commit
3ea57553
authored
Sep 24, 2021
by
A. Unique TensorFlower
Browse files
Internal change
PiperOrigin-RevId: 398757677
parent
da3f16f9
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
official/vision/beta/ops/anchor.py
official/vision/beta/ops/anchor.py
+1
-1
official/vision/beta/ops/anchor_test.py
official/vision/beta/ops/anchor_test.py
+1
-1
No files found.
official/vision/beta/ops/anchor.py
View file @
3ea57553
...
...
@@ -199,7 +199,7 @@ class AnchorLabeler(object):
for
k
,
v
in
gt_attributes
.
items
():
att_size
=
v
.
get_shape
().
as_list
()[
-
1
]
att_mask
=
tf
.
tile
(
cls_mask
,
[
1
,
att_size
])
att_targets
[
k
]
=
self
.
target_gather
(
v
,
match_indices
,
att_mask
,
-
1
)
att_targets
[
k
]
=
self
.
target_gather
(
v
,
match_indices
,
att_mask
,
0.0
)
weights
=
tf
.
squeeze
(
tf
.
ones_like
(
gt_labels
,
dtype
=
tf
.
float32
),
-
1
)
box_weights
=
self
.
target_gather
(
weights
,
match_indices
,
mask
)
...
...
official/vision/beta/ops/anchor_test.py
View file @
3ea57553
...
...
@@ -155,7 +155,7 @@ class AnchorTest(parameterized.TestCase, tf.test.TestCase):
att_targets
[
attribute_name
][
k
]
=
v
.
numpy
()
anchor_locations
=
np
.
vstack
(
np
.
where
(
att_targets
[
attribute_name
][
str
(
min_level
)]
>
-
1
)).
transpose
()
att_targets
[
attribute_name
][
str
(
min_level
)]
>
0.0
)).
transpose
()
self
.
assertAllClose
(
expected_anchor_locations
,
anchor_locations
)
else
:
self
.
assertEmpty
(
att_targets
)
...
...
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