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
87208da1
Commit
87208da1
authored
Apr 28, 2020
by
Chen Chen
Committed by
A. Unique TensorFlower
Apr 28, 2020
Browse files
Internal change
PiperOrigin-RevId: 308880055
parent
ae35d8c7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
+7
-4
official/benchmark/bert_benchmark_utils.py
official/benchmark/bert_benchmark_utils.py
+3
-2
official/benchmark/bert_pretrain_benchmark.py
official/benchmark/bert_pretrain_benchmark.py
+4
-2
No files found.
official/benchmark/bert_benchmark_utils.py
View file @
87208da1
...
@@ -67,8 +67,9 @@ class BertBenchmarkBase(PerfZeroBenchmark):
...
@@ -67,8 +67,9 @@ class BertBenchmarkBase(PerfZeroBenchmark):
"""Base class to hold methods common to test classes."""
"""Base class to hold methods common to test classes."""
local_flags
=
None
local_flags
=
None
def
__init__
(
self
,
output_dir
=
None
,
tpu
=
None
):
def
__init__
(
self
,
output_dir
=
None
,
tpu
=
None
,
**
kwargs
):
super
(
BertBenchmarkBase
,
self
).
__init__
(
output_dir
=
output_dir
,
tpu
=
tpu
)
super
(
BertBenchmarkBase
,
self
).
__init__
(
output_dir
=
output_dir
,
tpu
=
tpu
,
**
kwargs
)
self
.
num_gpus
=
8
self
.
num_gpus
=
8
self
.
timer_callback
=
None
self
.
timer_callback
=
None
...
...
official/benchmark/bert_pretrain_benchmark.py
View file @
87208da1
...
@@ -51,15 +51,17 @@ class BertPretrainAccuracyBenchmark(bert_benchmark_utils.BertBenchmarkBase):
...
@@ -51,15 +51,17 @@ class BertPretrainAccuracyBenchmark(bert_benchmark_utils.BertBenchmarkBase):
def
__init__
(
self
,
def
__init__
(
self
,
output_dir
:
Optional
[
str
]
=
None
,
output_dir
:
Optional
[
str
]
=
None
,
tpu
:
Optional
[
str
]
=
None
):
tpu
:
Optional
[
str
]
=
None
,
**
kwargs
):
"""Inits BertPretrainAccuracyBenchmark class.
"""Inits BertPretrainAccuracyBenchmark class.
Args:
Args:
output_dir: Directory where to output e.g. log files
output_dir: Directory where to output e.g. log files
tpu: TPU name to use in a TPU benchmark.
tpu: TPU name to use in a TPU benchmark.
**kwargs: Additional keyword arguments.
"""
"""
super
(
BertPretrainAccuracyBenchmark
,
self
).
__init__
(
super
(
BertPretrainAccuracyBenchmark
,
self
).
__init__
(
output_dir
=
output_dir
,
tpu
=
tpu
)
output_dir
=
output_dir
,
tpu
=
tpu
,
**
kwargs
)
@
benchmark_wrappers
.
enable_runtime_flags
@
benchmark_wrappers
.
enable_runtime_flags
def
_run_and_report_benchmark
(
self
,
summary_path
:
str
):
def
_run_and_report_benchmark
(
self
,
summary_path
:
str
):
...
...
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