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
ef4f89e3
Commit
ef4f89e3
authored
Aug 19, 2022
by
Fan Yang
Committed by
A. Unique TensorFlower
Aug 19, 2022
Browse files
Internal change
PiperOrigin-RevId: 468798729
parent
9c5ffc12
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
official/projects/qat/vision/serving/export_saved_model.py
official/projects/qat/vision/serving/export_saved_model.py
+3
-3
official/vision/serving/export_saved_model.py
official/vision/serving/export_saved_model.py
+2
-2
No files found.
official/projects/qat/vision/serving/export_saved_model.py
View file @
ef4f89e3
...
@@ -65,7 +65,7 @@ _PARAMS_OVERRIDE = flags.DEFINE_string(
...
@@ -65,7 +65,7 @@ _PARAMS_OVERRIDE = flags.DEFINE_string(
'params_override'
,
''
,
'params_override'
,
''
,
'The JSON/YAML file or string which specifies the parameter to be overriden'
'The JSON/YAML file or string which specifies the parameter to be overriden'
' on top of `config_file` template.'
)
' on top of `config_file` template.'
)
_BATCH_SIZ
S
E
=
flags
.
DEFINE_integer
(
'batch_size'
,
None
,
'The batch size.'
)
_BATCH_SIZE
=
flags
.
DEFINE_integer
(
'batch_size'
,
None
,
'The batch size.'
)
_IMAGE_TYPE
=
flags
.
DEFINE_string
(
_IMAGE_TYPE
=
flags
.
DEFINE_string
(
'input_type'
,
'image_tensor'
,
'input_type'
,
'image_tensor'
,
'One of `image_tensor`, `image_bytes`, `tf_example` and `tflite`.'
)
'One of `image_tensor`, `image_bytes`, `tf_example` and `tflite`.'
)
...
@@ -114,14 +114,14 @@ def main(_):
...
@@ -114,14 +114,14 @@ def main(_):
module
=
export_module_cls
(
module
=
export_module_cls
(
params
=
params
,
params
=
params
,
batch_size
=
_BATCH_SIZ
S
E
.
value
,
batch_size
=
_BATCH_SIZE
.
value
,
input_image_size
=
input_image_size
,
input_image_size
=
input_image_size
,
input_type
=
_IMAGE_TYPE
.
value
,
input_type
=
_IMAGE_TYPE
.
value
,
num_channels
=
3
)
num_channels
=
3
)
export_saved_model_lib
.
export_inference_graph
(
export_saved_model_lib
.
export_inference_graph
(
input_type
=
_IMAGE_TYPE
.
value
,
input_type
=
_IMAGE_TYPE
.
value
,
batch_size
=
_BATCH_SIZ
S
E
.
value
,
batch_size
=
_BATCH_SIZE
.
value
,
input_image_size
=
input_image_size
,
input_image_size
=
input_image_size
,
params
=
params
,
params
=
params
,
checkpoint_path
=
_CHECKPOINT_PATH
.
value
,
checkpoint_path
=
_CHECKPOINT_PATH
.
value
,
...
...
official/vision/serving/export_saved_model.py
View file @
ef4f89e3
...
@@ -63,7 +63,7 @@ _PARAMS_OVERRIDE = flags.DEFINE_string(
...
@@ -63,7 +63,7 @@ _PARAMS_OVERRIDE = flags.DEFINE_string(
'params_override'
,
''
,
'params_override'
,
''
,
'The JSON/YAML file or string which specifies the parameter to be overriden'
'The JSON/YAML file or string which specifies the parameter to be overriden'
' on top of `config_file` template.'
)
' on top of `config_file` template.'
)
_BATCH_SIZ
S
E
=
flags
.
DEFINE_integer
(
'batch_size'
,
None
,
'The batch size.'
)
_BATCH_SIZE
=
flags
.
DEFINE_integer
(
'batch_size'
,
None
,
'The batch size.'
)
_IMAGE_TYPE
=
flags
.
DEFINE_string
(
_IMAGE_TYPE
=
flags
.
DEFINE_string
(
'input_type'
,
'image_tensor'
,
'input_type'
,
'image_tensor'
,
'One of `image_tensor`, `image_bytes`, `tf_example` and `tflite`.'
)
'One of `image_tensor`, `image_bytes`, `tf_example` and `tflite`.'
)
...
@@ -101,7 +101,7 @@ def main(_):
...
@@ -101,7 +101,7 @@ def main(_):
export_saved_model_lib
.
export_inference_graph
(
export_saved_model_lib
.
export_inference_graph
(
input_type
=
_IMAGE_TYPE
.
value
,
input_type
=
_IMAGE_TYPE
.
value
,
batch_size
=
_BATCH_SIZ
S
E
.
value
,
batch_size
=
_BATCH_SIZE
.
value
,
input_image_size
=
[
int
(
x
)
for
x
in
_INPUT_IMAGE_SIZE
.
value
.
split
(
','
)],
input_image_size
=
[
int
(
x
)
for
x
in
_INPUT_IMAGE_SIZE
.
value
.
split
(
','
)],
params
=
params
,
params
=
params
,
checkpoint_path
=
_CHECKPOINT_PATH
.
value
,
checkpoint_path
=
_CHECKPOINT_PATH
.
value
,
...
...
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