Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
seminar-breakout
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Shashank Suhas
seminar-breakout
Commits
7c76e763
You need to sign in or sign up before continuing.
Commit
7c76e763
authored
Jun 01, 2020
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix serving export (fix #1449)
parent
315eab9d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
examples/FasterRCNN/predict.py
examples/FasterRCNN/predict.py
+1
-1
tensorpack/tfutils/export.py
tensorpack/tfutils/export.py
+2
-2
No files found.
examples/FasterRCNN/predict.py
View file @
7c76e763
...
@@ -150,7 +150,7 @@ if __name__ == '__main__':
...
@@ -150,7 +150,7 @@ if __name__ == '__main__':
if
args
.
output_pb
:
if
args
.
output_pb
:
ModelExporter
(
predcfg
)
.
export_compact
(
args
.
output_pb
,
optimize
=
False
)
ModelExporter
(
predcfg
)
.
export_compact
(
args
.
output_pb
,
optimize
=
False
)
elif
args
.
output_serving
:
elif
args
.
output_serving
:
ModelExporter
(
predcfg
)
.
export_serving
(
args
.
output_serving
,
optimize
=
False
)
ModelExporter
(
predcfg
)
.
export_serving
(
args
.
output_serving
)
if
args
.
predict
:
if
args
.
predict
:
predictor
=
OfflinePredictor
(
predcfg
)
predictor
=
OfflinePredictor
(
predcfg
)
...
...
tensorpack/tfutils/export.py
View file @
7c76e763
...
@@ -97,7 +97,7 @@ class ModelExporter(object):
...
@@ -97,7 +97,7 @@ class ModelExporter(object):
Args:
Args:
filename (str): path for export directory
filename (str): path for export directory
tags (tuple): tuple of user specified tags. Defaults to "SERVING".
tags (tuple): tuple of user specified tags. Defaults to
just
"SERVING".
signature_name (str): name of signature for prediction
signature_name (str): name of signature for prediction
Note:
Note:
...
@@ -115,7 +115,7 @@ class ModelExporter(object):
...
@@ -115,7 +115,7 @@ class ModelExporter(object):
"""
"""
if
tags
is
None
:
if
tags
is
None
:
tags
=
(
tf
.
saved_model
.
SERVING
if
get_tf_version_tuple
()
>=
(
1
,
12
)
tags
=
(
tf
.
saved_model
.
SERVING
if
get_tf_version_tuple
()
>=
(
1
,
12
)
else
tf
.
saved_model
.
tag_constants
.
SERVING
)
else
tf
.
saved_model
.
tag_constants
.
SERVING
,
)
self
.
graph
=
self
.
config
.
_maybe_create_graph
()
self
.
graph
=
self
.
config
.
_maybe_create_graph
()
with
self
.
graph
.
as_default
():
with
self
.
graph
.
as_default
():
...
...
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