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
0839edea
Commit
0839edea
authored
Aug 03, 2017
by
Pete Warden
Committed by
GitHub
Aug 03, 2017
Browse files
Merge pull request #2112 from jeuvilla/master
Adding knob to export_inference_graph.py
parents
6d140f13
3a68b363
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
slim/export_inference_graph.py
slim/export_inference_graph.py
+7
-1
No files found.
slim/export_inference_graph.py
View file @
0839edea
...
...
@@ -75,6 +75,11 @@ tf.app.flags.DEFINE_integer(
'image_size'
,
None
,
'The image size to use, otherwise use the model default_image_size.'
)
tf
.
app
.
flags
.
DEFINE_integer
(
'batch_size'
,
None
,
'Batch size for the exported model. Defaulted to "None" so batch size can '
'be specified at model runtime.'
)
tf
.
app
.
flags
.
DEFINE_string
(
'dataset_name'
,
'imagenet'
,
'The name of the dataset to use with the model.'
)
...
...
@@ -106,7 +111,8 @@ def main(_):
is_training
=
FLAGS
.
is_training
)
image_size
=
FLAGS
.
image_size
or
network_fn
.
default_image_size
placeholder
=
tf
.
placeholder
(
name
=
'input'
,
dtype
=
tf
.
float32
,
shape
=
[
1
,
image_size
,
image_size
,
3
])
shape
=
[
FLAGS
.
batch_size
,
image_size
,
image_size
,
3
])
network_fn
(
placeholder
)
graph_def
=
graph
.
as_graph_def
()
with
gfile
.
GFile
(
FLAGS
.
output_file
,
'wb'
)
as
f
:
...
...
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