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
b3ab2074
Commit
b3ab2074
authored
Apr 17, 2020
by
Hongkun Yu
Committed by
A. Unique TensorFlower
Apr 17, 2020
Browse files
Internal change
PiperOrigin-RevId: 307089919
parent
85b50c88
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
official/vision/image_classification/classifier_trainer.py
official/vision/image_classification/classifier_trainer.py
+5
-6
No files found.
official/vision/image_classification/classifier_trainer.py
View file @
b3ab2074
...
...
@@ -353,7 +353,8 @@ def train_and_eval(
loss_obj
=
tf
.
keras
.
losses
.
SparseCategoricalCrossentropy
()
model
.
compile
(
optimizer
=
optimizer
,
loss
=
loss_obj
,
metrics
=
metrics
)
metrics
=
metrics
,
experimental_steps_per_execution
=
params
.
train
.
steps_per_loop
)
initial_epoch
=
0
if
params
.
train
.
resume_checkpoint
:
...
...
@@ -389,9 +390,8 @@ def train_and_eval(
steps_per_epoch
=
train_steps
,
initial_epoch
=
initial_epoch
,
callbacks
=
callbacks
,
**
validation_kwargs
,
experimental_steps_per_execution
=
params
.
train
.
steps_per_loop
,
verbose
=
2
)
verbose
=
2
,
**
validation_kwargs
)
validation_output
=
None
if
not
params
.
evaluation
.
skip_eval
:
...
...
@@ -441,8 +441,7 @@ def run(flags_obj: flags.FlagValues,
def
main
(
_
):
with
logger
.
benchmark_context
(
flags
.
FLAGS
):
stats
=
run
(
flags
.
FLAGS
)
stats
=
run
(
flags
.
FLAGS
)
if
stats
:
logging
.
info
(
'Run stats:
\n
%s'
,
stats
)
...
...
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