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
dc93d9e5
Commit
dc93d9e5
authored
Oct 08, 2019
by
A. Unique TensorFlower
Browse files
Internal change
PiperOrigin-RevId: 273562498
parent
d0f21f25
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
official/vision/image_classification/resnet_imagenet_main.py
official/vision/image_classification/resnet_imagenet_main.py
+6
-3
No files found.
official/vision/image_classification/resnet_imagenet_main.py
View file @
dc93d9e5
...
...
@@ -232,9 +232,12 @@ def run(flags_obj):
validation_freq
=
flags_obj
.
epochs_between_evals
,
verbose
=
2
)
if
flags_obj
.
enable_checkpoint_and_export
:
# Keras model.save assumes a float32 input designature.
export_path
=
os
.
path
.
join
(
flags_obj
.
model_dir
,
'saved_model'
)
model
.
save
(
export_path
,
include_optimizer
=
False
)
if
dtype
==
tf
.
bfloat16
:
logging
.
warning
(
"Keras model.save does not support bfloat16 dtype."
)
else
:
# Keras model.save assumes a float32 input designature.
export_path
=
os
.
path
.
join
(
flags_obj
.
model_dir
,
'saved_model'
)
model
.
save
(
export_path
,
include_optimizer
=
False
)
eval_output
=
None
if
not
flags_obj
.
skip_eval
:
...
...
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