Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
python3-imagej-tiff
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Elphel
python3-imagej-tiff
Commits
56f982a2
Commit
56f982a2
authored
Sep 21, 2018
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
now saves *.pb - it's enough to run just this script
parent
f0673b1a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
infer_qcds_01.py
infer_qcds_01.py
+9
-3
No files found.
infer_qcds_01.py
View file @
56f982a2
...
...
@@ -345,9 +345,15 @@ with tf.Session() as sess:
"""
image_data
[
nimg
]
=
None
# is this needed? why would it be?
#meta_graph_def = tf.train.export_meta_graph(files["inference"]+'.meta')
"""
Save MetaGraph to Saved_Model in *.pb (protocol buffer) format to
be able to use from Java
"""
# force clean
shutil
.
rmtree
(
dirs
[
'exportdir'
],
ignore_errors
=
True
)
builder
=
tf
.
saved_model
.
builder
.
SavedModelBuilder
(
dirs
[
'exportdir'
])
builder
.
add_meta_graph_and_variables
(
sess
,[
tf
.
saved_model
.
tag_constants
.
SERVING
],
main_op
=
tf
.
local_variables_initializer
())
builder
.
save
(
False
)
# True = *.pbtxt, False = *.pb
if
lf
:
lf
.
close
()
...
...
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