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
26bbda73
Commit
26bbda73
authored
Dec 10, 2019
by
David Chen
Committed by
A. Unique TensorFlower
Dec 10, 2019
Browse files
Internal change
PiperOrigin-RevId: 284874717
parent
38e48f91
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
3 deletions
+12
-3
official/utils/testing/perfzero_benchmark.py
official/utils/testing/perfzero_benchmark.py
+12
-3
No files found.
official/utils/testing/perfzero_benchmark.py
View file @
26bbda73
...
...
@@ -35,19 +35,28 @@ class PerfZeroBenchmark(tf.test.Benchmark):
"""
local_flags
=
None
def
__init__
(
self
,
output_dir
=
None
,
default_flags
=
None
,
flag_methods
=
None
):
def
__init__
(
self
,
output_dir
=
None
,
default_flags
=
None
,
flag_methods
=
None
,
tpu
=
None
):
"""Initialize class.
Args:
output_dir: Base directory to store all output for the test.
default_flags:
flag_methods:
default_flags: Set of flags to pass to model.
flag_methods: Set of flag methods to run during setup.
tpu: (optional) TPU name to use in a TPU benchmark.
"""
if
not
output_dir
:
output_dir
=
'/tmp'
self
.
output_dir
=
output_dir
self
.
default_flags
=
default_flags
or
{}
self
.
flag_methods
=
flag_methods
or
{}
if
tpu
:
# TPU models are expected to accept a --tpu=name flag. PerfZero creates
# the TPU at runtime and passes the TPU's name to this flag.
self
.
default_flags
[
'tpu'
]
=
tpu
def
_get_model_dir
(
self
,
folder_name
):
"""Returns directory to store info, e.g. saved model and event log."""
...
...
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