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
a1b04a45
Commit
a1b04a45
authored
Nov 15, 2020
by
Hongkun Yu
Committed by
A. Unique TensorFlower
Nov 15, 2020
Browse files
experimental_steps_per_execution -> steps_per_execution for TF 2.4 release.
PiperOrigin-RevId: 342566888
parent
2560387f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
4 deletions
+4
-4
official/nlp/bert/run_classifier.py
official/nlp/bert/run_classifier.py
+1
-1
official/nlp/nhnet/trainer.py
official/nlp/nhnet/trainer.py
+1
-1
official/vision/image_classification/classifier_trainer.py
official/vision/image_classification/classifier_trainer.py
+1
-1
official/vision/image_classification/configs/base_configs.py
official/vision/image_classification/configs/base_configs.py
+1
-1
No files found.
official/nlp/bert/run_classifier.py
View file @
a1b04a45
...
@@ -229,7 +229,7 @@ def run_keras_compile_fit(model_dir,
...
@@ -229,7 +229,7 @@ def run_keras_compile_fit(model_dir,
optimizer
=
optimizer
,
optimizer
=
optimizer
,
loss
=
loss_fn
,
loss
=
loss_fn
,
metrics
=
[
fn
()
for
fn
in
metric_fn
],
metrics
=
[
fn
()
for
fn
in
metric_fn
],
experimental_
steps_per_execution
=
steps_per_loop
)
steps_per_execution
=
steps_per_loop
)
summary_dir
=
os
.
path
.
join
(
model_dir
,
'summaries'
)
summary_dir
=
os
.
path
.
join
(
model_dir
,
'summaries'
)
summary_callback
=
tf
.
keras
.
callbacks
.
TensorBoard
(
summary_dir
)
summary_callback
=
tf
.
keras
.
callbacks
.
TensorBoard
(
summary_dir
)
...
...
official/nlp/nhnet/trainer.py
View file @
a1b04a45
...
@@ -144,7 +144,7 @@ def train(params, strategy, dataset=None):
...
@@ -144,7 +144,7 @@ def train(params, strategy, dataset=None):
trainer
.
compile
(
trainer
.
compile
(
optimizer
=
opt
,
optimizer
=
opt
,
experimental_
steps_per_execution
=
FLAGS
.
steps_per_loop
)
steps_per_execution
=
FLAGS
.
steps_per_loop
)
summary_dir
=
os
.
path
.
join
(
FLAGS
.
model_dir
,
"summaries"
)
summary_dir
=
os
.
path
.
join
(
FLAGS
.
model_dir
,
"summaries"
)
summary_callback
=
tf
.
keras
.
callbacks
.
TensorBoard
(
summary_callback
=
tf
.
keras
.
callbacks
.
TensorBoard
(
summary_dir
,
update_freq
=
max
(
100
,
FLAGS
.
steps_per_loop
))
summary_dir
,
update_freq
=
max
(
100
,
FLAGS
.
steps_per_loop
))
...
...
official/vision/image_classification/classifier_trainer.py
View file @
a1b04a45
...
@@ -352,7 +352,7 @@ def train_and_eval(
...
@@ -352,7 +352,7 @@ def train_and_eval(
optimizer
=
optimizer
,
optimizer
=
optimizer
,
loss
=
loss_obj
,
loss
=
loss_obj
,
metrics
=
metrics
,
metrics
=
metrics
,
experimental_
steps_per_execution
=
steps_per_loop
)
steps_per_execution
=
steps_per_loop
)
initial_epoch
=
0
initial_epoch
=
0
if
params
.
train
.
resume_checkpoint
:
if
params
.
train
.
resume_checkpoint
:
...
...
official/vision/image_classification/configs/base_configs.py
View file @
a1b04a45
...
@@ -75,7 +75,7 @@ class TrainConfig(hyperparams.Config):
...
@@ -75,7 +75,7 @@ class TrainConfig(hyperparams.Config):
callbacks: An instance of CallbacksConfig.
callbacks: An instance of CallbacksConfig.
metrics: An instance of MetricsConfig.
metrics: An instance of MetricsConfig.
tensorboard: An instance of TensorboardConfig.
tensorboard: An instance of TensorboardConfig.
set_epoch_loop: Whether or not to set `
experimental_
steps_per_execution` to
set_epoch_loop: Whether or not to set `steps_per_execution` to
equal the number of training steps in `model.compile`. This reduces the
equal the number of training steps in `model.compile`. This reduces the
number of callbacks run per epoch which significantly improves end-to-end
number of callbacks run per epoch which significantly improves end-to-end
TPU training time.
TPU training time.
...
...
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