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
1c509f19
Unverified
Commit
1c509f19
authored
Jul 24, 2019
by
Toby Boyd
Committed by
GitHub
Jul 24, 2019
Browse files
Additional force_v2 tests. (#7296)
parent
9fb1a1b6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
2 deletions
+29
-2
official/staging/shakespeare/shakespeare_benchmark.py
official/staging/shakespeare/shakespeare_benchmark.py
+29
-2
No files found.
official/staging/shakespeare/shakespeare_benchmark.py
View file @
1c509f19
...
...
@@ -147,7 +147,7 @@ class ShakespeareAccuracy(ShakespeareBenchmarkBase):
FLAGS
.
model_dir
=
''
self
.
_run_and_report_benchmark
()
def
benchmark_1_gpu_no_ds
_run_eagerly
(
self
):
def
benchmark_1_gpu_no_ds
(
self
):
"""Benchmark 1 gpu without distribution strategies."""
self
.
_setup
()
FLAGS
.
num_gpus
=
1
...
...
@@ -155,9 +155,19 @@ class ShakespeareAccuracy(ShakespeareBenchmarkBase):
FLAGS
.
batch_size
=
64
FLAGS
.
train_epochs
=
43
FLAGS
.
model_dir
=
''
FLAGS
.
run_eagerly
=
True
FLAGS
.
distribution_strategy
=
'off'
self
.
_run_and_report_benchmark
()
def
benchmark_1_gpu_no_ds_run_eagerly
(
self
):
"""Benchmark 1 gpu without distribution strategies and run eagerly."""
self
.
_setup
()
FLAGS
.
num_gpus
=
1
FLAGS
.
training_data
=
self
.
train_data
FLAGS
.
batch_size
=
64
FLAGS
.
train_epochs
=
43
FLAGS
.
model_dir
=
''
FLAGS
.
run_eagerly
=
True
FLAGS
.
distribution_strategy
=
'off'
self
.
_run_and_report_benchmark
()
def
benchmark_1_gpu_no_ds_force_v2
(
self
):
...
...
@@ -264,6 +274,14 @@ class ShakespeareKerasBenchmarkReal(ShakespeareBenchmarkBase):
FLAGS
.
distribution_strategy
=
'off'
self
.
_run_and_report_benchmark
()
def
benchmark_cpu_no_ds_force_v2
(
self
):
"""Benchmark cpu no ds, and force v2."""
self
.
_setup
()
FLAGS
.
num_gpus
=
0
FLAGS
.
batch_size
=
64
FLAGS
.
distribution_strategy
=
'off'
self
.
_run_and_report_benchmark
()
def
benchmark_1_gpu
(
self
):
"""Benchmark 1 gpu."""
self
.
_setup
()
...
...
@@ -279,6 +297,15 @@ class ShakespeareKerasBenchmarkReal(ShakespeareBenchmarkBase):
FLAGS
.
distribution_strategy
=
'off'
self
.
_run_and_report_benchmark
()
def
benchmark_1_gpu_no_ds_force_v2
(
self
):
"""Benchmark 1 gpu no ds, and force v2."""
self
.
_setup
()
FLAGS
.
num_gpus
=
1
FLAGS
.
batch_size
=
64
FLAGS
.
force_v2_in_keras_compile
=
True
FLAGS
.
distribution_strategy
=
'off'
self
.
_run_and_report_benchmark
()
def
benchmark_1_gpu_no_ds_run_eagerly
(
self
):
"""Benchmark 1 gpu."""
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