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
150f99dc
Commit
150f99dc
authored
Feb 22, 2022
by
A. Unique TensorFlower
Browse files
Internal change
PiperOrigin-RevId: 430346911
parent
9bea50c4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
official/benchmark/resnet50_keras_core.py
official/benchmark/resnet50_keras_core.py
+10
-1
No files found.
official/benchmark/resnet50_keras_core.py
View file @
150f99dc
...
...
@@ -15,6 +15,7 @@
# ==============================================================================
"""Resnet50 Keras core benchmark."""
import
statistics
import
tempfile
import
time
...
...
@@ -100,7 +101,7 @@ class Resnet50KerasCoreBenchmark(perfzero_benchmark.PerfZeroBenchmark):
wall_times
=
[]
for
_
in
range
(
num_trials
):
wall_times
.
append
(
_run_benchmark
())
avg_wall_time
=
s
um
(
wall_times
)
/
float
(
le
n
(
wall_times
)
)
avg_wall_time
=
s
tatistics
.
mea
n
(
wall_times
)
self
.
report_benchmark
(
iters
=-
1
,
wall_time
=
avg_wall_time
)
def
benchmark_1_gpu_max_3
(
self
):
...
...
@@ -111,5 +112,13 @@ class Resnet50KerasCoreBenchmark(perfzero_benchmark.PerfZeroBenchmark):
max_wall_time
=
max
(
wall_times
)
self
.
report_benchmark
(
iters
=-
1
,
wall_time
=
max_wall_time
)
def
benchmark_1_gpu_med_3
(
self
):
num_trials
=
3
wall_times
=
[]
for
_
in
range
(
num_trials
):
wall_times
.
append
(
_run_benchmark
())
med_wall_time
=
statistics
.
median
(
wall_times
)
self
.
report_benchmark
(
iters
=-
1
,
wall_time
=
med_wall_time
)
if
__name__
==
"__main__"
:
tf
.
test
.
main
()
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