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
952dd997
"vscode:/vscode.git/clone" did not exist on "bbb71033c680bdf8634f88cd16ff067184a478f4"
Commit
952dd997
authored
Mar 27, 2018
by
Zhichao Lu
Committed by
pkulzc
Apr 02, 2018
Browse files
Improved shape inference for reshape
PiperOrigin-RevId: 190651873
parent
bb43ed96
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
research/object_detection/core/preprocessor.py
research/object_detection/core/preprocessor.py
+5
-1
No files found.
research/object_detection/core/preprocessor.py
View file @
952dd997
...
@@ -2279,7 +2279,11 @@ def resize_image(image,
...
@@ -2279,7 +2279,11 @@ def resize_image(image,
return
new_masks
return
new_masks
def
reshape_masks_branch
():
def
reshape_masks_branch
():
new_masks
=
tf
.
reshape
(
masks
,
[
0
,
new_size
[
0
],
new_size
[
1
]])
# The shape function will be computed for both branches of the
# condition, regardless of which branch is actually taken. Make sure
# that we don't trigger an assertion in the shape function when trying
# to reshape a non empty tensor into an empty one.
new_masks
=
tf
.
reshape
(
masks
,
[
-
1
,
new_size
[
0
],
new_size
[
1
]])
return
new_masks
return
new_masks
masks
=
tf
.
cond
(
num_instances
>
0
,
resize_masks_branch
,
masks
=
tf
.
cond
(
num_instances
>
0
,
resize_masks_branch
,
...
...
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