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
Lozac'h Loic
otbtf
Commits
bcad8381
Commit
bcad8381
authored
Mar 27, 2019
by
Cresson Remi
Browse files
ENH: use TF API to export SAvedModel
parent
4b83ea2e
Changes
1
Show whitespace changes
Inline
Side-by-side
python/tricks.py
View file @
bcad8381
...
...
@@ -153,4 +153,9 @@ def CheckpointToSavedModel(ckpt_path, inputs, outputs, savedmodel_path, clear_de
model_saver
.
restore
(
sess
,
ckpt_path
)
# Create a SavedModel
CreateSavedModel
(
sess
,
inputs
,
outputs
,
savedmodel_path
)
\ No newline at end of file
#CreateSavedModel(sess, inputs, outputs, savedmodel_path)
graph
=
tf
.
get_default_graph
()
tf
.
saved_model
.
simple_save
(
sess
,
savedmodel_path
,
inputs
=
{
i
:
graph
.
get_tensor_by_name
(
i
)
for
i
in
inputs
},
outputs
=
{
o
:
graph
.
get_tensor_by_name
(
o
)
for
o
in
outputs
})
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