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
ab993a21
Commit
ab993a21
authored
May 29, 2019
by
Haoyu Zhang
Committed by
Toby Boyd
May 29, 2019
Browse files
Add tweaked cloning tests (#6916)
parent
e0388cfe
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
59 additions
and
0 deletions
+59
-0
official/resnet/keras/keras_imagenet_benchmark.py
official/resnet/keras/keras_imagenet_benchmark.py
+59
-0
No files found.
official/resnet/keras/keras_imagenet_benchmark.py
View file @
ab993a21
...
...
@@ -510,6 +510,23 @@ class Resnet50KerasBenchmarkBase(keras_benchmark.KerasBenchmark):
FLAGS
.
data_delay_prefetch
=
True
self
.
_run_and_report_benchmark
()
def
benchmark_8_gpu_fp16_cloning_tweaked
(
self
):
"""Test Keras model with 8 GPUs, fp16, cloning, and manual config tuning."""
self
.
_setup
()
FLAGS
.
num_gpus
=
8
FLAGS
.
dtype
=
'fp16'
FLAGS
.
enable_eager
=
True
FLAGS
.
distribution_strategy
=
'default'
FLAGS
.
clone_model_in_keras_dist_strat
=
True
FLAGS
.
model_dir
=
self
.
_get_model_dir
(
'benchmark_8_gpu_fp16_cloning_tweaked'
)
FLAGS
.
batch_size
=
256
*
8
FLAGS
.
use_tensor_lr
=
True
FLAGS
.
tf_gpu_thread_mode
=
'gpu_private'
FLAGS
.
data_delay_prefetch
=
True
self
.
_run_and_report_benchmark
()
def
benchmark_8_gpu_fp16_dynamic_tweaked
(
self
):
"""Test Keras model with 8 GPUs, fp16, dynamic loss scaling, and manual
config tuning.
...
...
@@ -572,6 +589,26 @@ class Resnet50KerasBenchmarkBase(keras_benchmark.KerasBenchmark):
FLAGS
.
data_delay_prefetch
=
True
self
.
_run_and_report_benchmark
()
def
benchmark_xla_8_gpu_fp16_cloning_tweaked
(
self
):
"""Test Keras model with manual config tuning, XLA, 8 GPUs, fp16, and
cloning.
"""
self
.
_setup
()
FLAGS
.
num_gpus
=
8
FLAGS
.
dtype
=
'fp16'
FLAGS
.
enable_eager
=
True
FLAGS
.
enable_xla
=
True
FLAGS
.
distribution_strategy
=
'default'
FLAGS
.
clone_model_in_keras_dist_strat
=
True
FLAGS
.
model_dir
=
self
.
_get_model_dir
(
'benchmark_xla_8_gpu_fp16_cloning_tweaked'
)
FLAGS
.
batch_size
=
256
*
8
FLAGS
.
use_tensor_lr
=
True
# FLAGS.tf_gpu_thread_mode = 'gpu_private'
FLAGS
.
data_delay_prefetch
=
True
self
.
_run_and_report_benchmark
()
def
benchmark_xla_8_gpu_fp16_tweaked_delay_measure
(
self
):
"""Test Keras model with manual config tuning, XLA, 8 GPUs and fp16. Delay
performance measurement for stable performance on 96 vCPU platforms.
...
...
@@ -592,6 +629,28 @@ class Resnet50KerasBenchmarkBase(keras_benchmark.KerasBenchmark):
FLAGS
.
train_steps
=
310
self
.
_run_and_report_benchmark
()
def
benchmark_xla_8_gpu_fp16_cloning_tweaked_delay_measure
(
self
):
"""Test Keras model with manual config tuning, XLA, 8 GPUs, fp16, and
cloning. Delay performance measurement for stable performance on 96 vCPU
platforms.
"""
self
.
_setup
()
FLAGS
.
num_gpus
=
8
FLAGS
.
dtype
=
'fp16'
FLAGS
.
enable_eager
=
True
FLAGS
.
enable_xla
=
True
FLAGS
.
distribution_strategy
=
'default'
FLAGS
.
clone_model_in_keras_dist_strat
=
True
FLAGS
.
model_dir
=
self
.
_get_model_dir
(
'benchmark_xla_8_gpu_fp16_cloning_tweaked_delay_measure'
)
FLAGS
.
batch_size
=
256
*
8
FLAGS
.
use_tensor_lr
=
True
FLAGS
.
tf_gpu_thread_mode
=
'gpu_private'
FLAGS
.
data_delay_prefetch
=
True
FLAGS
.
train_steps
=
310
self
.
_run_and_report_benchmark
()
def
benchmark_xla_8_gpu_fp16_tweaked_optional_next
(
self
):
"""Test Keras model with manual config tuning, XLA, 8 GPUs, fp16.
...
...
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