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
7dbbca9d
"vscode:/vscode.git/clone" did not exist on "68d39c708f7f773ca95c2d0cbed35fd1dfa093a2"
Commit
7dbbca9d
authored
Mar 26, 2019
by
Haoyu Zhang
Committed by
Toby Boyd
Mar 26, 2019
Browse files
Add Keras ResNet model tests in legacy graph mode (#6444)
parent
e2ef6108
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
0 deletions
+30
-0
official/resnet/keras/keras_imagenet_benchmark.py
official/resnet/keras/keras_imagenet_benchmark.py
+30
-0
No files found.
official/resnet/keras/keras_imagenet_benchmark.py
View file @
7dbbca9d
...
@@ -352,6 +352,36 @@ class Resnet50KerasBenchmarkBase(keras_benchmark.KerasBenchmark):
...
@@ -352,6 +352,36 @@ 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_graph_xla_8_gpu_fp16
(
self
):
"""Test Keras model in legacy graph mode with XLA, 8 GPUs and fp16."""
self
.
_setup
()
FLAGS
.
num_gpus
=
8
FLAGS
.
dtype
=
'fp16'
FLAGS
.
enable_eager
=
False
FLAGS
.
enable_xla
=
True
FLAGS
.
distribution_strategy
=
'default'
FLAGS
.
model_dir
=
self
.
_get_model_dir
(
'benchmark_graph_xla_8_gpu_fp16'
)
FLAGS
.
batch_size
=
256
*
8
# 8 GPUs
self
.
_run_and_report_benchmark
()
def
benchmark_graph_xla_8_gpu_fp16_tweaked
(
self
):
"""Test Keras model in legacy graph mode with manual config tuning, XLA,
8 GPUs and fp16.
"""
self
.
_setup
()
FLAGS
.
num_gpus
=
8
FLAGS
.
dtype
=
'fp16'
FLAGS
.
enable_eager
=
False
FLAGS
.
enable_xla
=
True
FLAGS
.
distribution_strategy
=
'default'
FLAGS
.
model_dir
=
self
.
_get_model_dir
(
'benchmark_graph_xla_8_gpu_fp16_tweaked'
)
FLAGS
.
batch_size
=
256
*
8
# 8 GPUs
FLAGS
.
tf_gpu_thread_mode
=
'gpu_private'
self
.
_run_and_report_benchmark
()
def
fill_report_object
(
self
,
stats
):
def
fill_report_object
(
self
,
stats
):
super
(
Resnet50KerasBenchmarkBase
,
self
).
fill_report_object
(
super
(
Resnet50KerasBenchmarkBase
,
self
).
fill_report_object
(
stats
,
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