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
39a5fe56
Commit
39a5fe56
authored
Sep 22, 2020
by
Pankaj Kanwar
Committed by
A. Unique TensorFlower
Sep 22, 2020
Browse files
Internal change
PiperOrigin-RevId: 333119766
parent
4e50660b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
0 deletions
+21
-0
official/benchmark/keras_imagenet_benchmark.py
official/benchmark/keras_imagenet_benchmark.py
+11
-0
official/benchmark/resnet_ctl_imagenet_benchmark.py
official/benchmark/resnet_ctl_imagenet_benchmark.py
+10
-0
No files found.
official/benchmark/keras_imagenet_benchmark.py
View file @
39a5fe56
...
@@ -908,6 +908,17 @@ class Resnet50KerasBenchmarkBase(keras_benchmark.KerasBenchmark):
...
@@ -908,6 +908,17 @@ class Resnet50KerasBenchmarkBase(keras_benchmark.KerasBenchmark):
FLAGS
.
batch_size
=
128
*
8
# 8 GPUs
FLAGS
.
batch_size
=
128
*
8
# 8 GPUs
self
.
_run_and_report_benchmark
()
self
.
_run_and_report_benchmark
()
def
benchmark_8_gpu_fp32_no_tf32
(
self
):
"""Test Keras model with 8 GPUs.Runs in FP32 by disabling TF32 execution."""
self
.
_setup
()
tf
.
config
.
experimental
.
enable_tensor_float_32_execution
(
False
)
FLAGS
.
num_gpus
=
8
FLAGS
.
enable_eager
=
True
FLAGS
.
distribution_strategy
=
'mirrored'
FLAGS
.
model_dir
=
self
.
_get_model_dir
(
'benchmark_8_gpu_fp32_no_tf32'
)
FLAGS
.
batch_size
=
128
*
8
# 8 GPUs
self
.
_run_and_report_benchmark
()
def
benchmark_8_gpu_amp
(
self
):
def
benchmark_8_gpu_amp
(
self
):
"""Test Keras model with 8 GPUs with automatic mixed precision."""
"""Test Keras model with 8 GPUs with automatic mixed precision."""
self
.
_setup
()
self
.
_setup
()
...
...
official/benchmark/resnet_ctl_imagenet_benchmark.py
View file @
39a5fe56
...
@@ -313,6 +313,16 @@ class Resnet50CtlBenchmarkBase(CtlBenchmark):
...
@@ -313,6 +313,16 @@ class Resnet50CtlBenchmarkBase(CtlBenchmark):
FLAGS
.
batch_size
=
128
*
8
# 8 GPUs
FLAGS
.
batch_size
=
128
*
8
# 8 GPUs
self
.
_run_and_report_benchmark
()
self
.
_run_and_report_benchmark
()
def
benchmark_8_gpu_fp32_no_tf32
(
self
):
"""Test Keras model with 8 GPUs.Runs in FP32 by disabling TF32 execution."""
self
.
_setup
()
tf
.
config
.
experimental
.
enable_tensor_float_32_execution
(
False
)
FLAGS
.
num_gpus
=
8
FLAGS
.
distribution_strategy
=
'mirrored'
FLAGS
.
model_dir
=
self
.
_get_model_dir
(
'benchmark_8_gpu_fp32_no_tf32'
)
FLAGS
.
batch_size
=
128
*
8
# 8 GPUs
self
.
_run_and_report_benchmark
()
def
benchmark_8_gpu_fp16
(
self
):
def
benchmark_8_gpu_fp16
(
self
):
"""Test Keras model with 8 GPUs with tf.keras mixed precision."""
"""Test Keras model with 8 GPUs with tf.keras mixed precision."""
self
.
_setup
()
self
.
_setup
()
...
...
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