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
14adc803
Commit
14adc803
authored
Sep 15, 2020
by
A. Unique TensorFlower
Committed by
TF Object Detection Team
Sep 15, 2020
Browse files
Replace tf.unstack with tf.slice in clip_to_window() to avoid invalid node names.
PiperOrigin-RevId: 331805783
parent
04c56a03
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
research/object_detection/core/box_list_ops.py
research/object_detection/core/box_list_ops.py
+4
-1
No files found.
research/object_detection/core/box_list_ops.py
View file @
14adc803
...
@@ -151,7 +151,10 @@ def clip_to_window(boxlist, window, filter_nonoverlapping=True, scope=None):
...
@@ -151,7 +151,10 @@ def clip_to_window(boxlist, window, filter_nonoverlapping=True, scope=None):
with
tf
.
name_scope
(
scope
,
'ClipToWindow'
):
with
tf
.
name_scope
(
scope
,
'ClipToWindow'
):
y_min
,
x_min
,
y_max
,
x_max
=
tf
.
split
(
y_min
,
x_min
,
y_max
,
x_max
=
tf
.
split
(
value
=
boxlist
.
get
(),
num_or_size_splits
=
4
,
axis
=
1
)
value
=
boxlist
.
get
(),
num_or_size_splits
=
4
,
axis
=
1
)
win_y_min
,
win_x_min
,
win_y_max
,
win_x_max
=
tf
.
unstack
(
window
)
win_y_min
=
window
[
0
]
win_x_min
=
window
[
1
]
win_y_max
=
window
[
2
]
win_x_max
=
window
[
3
]
y_min_clipped
=
tf
.
maximum
(
tf
.
minimum
(
y_min
,
win_y_max
),
win_y_min
)
y_min_clipped
=
tf
.
maximum
(
tf
.
minimum
(
y_min
,
win_y_max
),
win_y_min
)
y_max_clipped
=
tf
.
maximum
(
tf
.
minimum
(
y_max
,
win_y_max
),
win_y_min
)
y_max_clipped
=
tf
.
maximum
(
tf
.
minimum
(
y_max
,
win_y_max
),
win_y_min
)
x_min_clipped
=
tf
.
maximum
(
tf
.
minimum
(
x_min
,
win_x_max
),
win_x_min
)
x_min_clipped
=
tf
.
maximum
(
tf
.
minimum
(
x_min
,
win_x_max
),
win_x_min
)
...
...
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