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
5cee7220
Commit
5cee7220
authored
Sep 17, 2020
by
Zhenyu Tan
Committed by
A. Unique TensorFlower
Sep 17, 2020
Browse files
Internal change
PiperOrigin-RevId: 332377554
parent
e342145e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
10 deletions
+6
-10
official/vision/keras_cv/ops/box_matcher.py
official/vision/keras_cv/ops/box_matcher.py
+6
-10
No files found.
official/vision/keras_cv/ops/box_matcher.py
View file @
5cee7220
...
@@ -146,16 +146,12 @@ class BoxMatcher:
...
@@ -146,16 +146,12 @@ class BoxMatcher:
else
:
else
:
return
matches
return
matches
if
similarity_matrix
.
shape
.
is_fully_defined
():
num_gt_boxes
=
similarity_matrix
.
shape
.
as_list
()[
0
]
or
tf
.
shape
(
if
similarity_matrix
.
shape
.
dims
[
0
].
value
==
0
:
similarity_matrix
)[
0
]
return
_match_when_rows_are_empty
()
return
tf
.
cond
(
else
:
pred
=
tf
.
greater
(
num_gt_boxes
,
0
),
return
_match_when_rows_are_non_empty
()
true_fn
=
_match_when_rows_are_non_empty
,
else
:
false_fn
=
_match_when_rows_are_empty
)
return
tf
.
cond
(
pred
=
tf
.
greater
(
tf
.
shape
(
similarity_matrix
)[
0
],
0
),
true_fn
=
_match_when_rows_are_non_empty
,
false_fn
=
_match_when_rows_are_empty
)
def
_set_values_using_indicator
(
self
,
x
,
indicator
,
val
):
def
_set_values_using_indicator
(
self
,
x
,
indicator
,
val
):
"""Set the indicated fields of x to val.
"""Set the indicated fields of x to val.
...
...
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