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
4f58b1f7
Commit
4f58b1f7
authored
Mar 17, 2020
by
A. Unique TensorFlower
Browse files
Internal change
PiperOrigin-RevId: 301434099
parent
bc5b60ef
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
official/benchmark/tfhub_memory_usage_benchmark.py
official/benchmark/tfhub_memory_usage_benchmark.py
+7
-1
No files found.
official/benchmark/tfhub_memory_usage_benchmark.py
View file @
4f58b1f7
...
...
@@ -41,8 +41,14 @@ class TfHubMemoryUsageBenchmark(PerfZeroBenchmark):
output_dir
=
output_dir
,
default_flags
=
default_flags
,
**
kwargs
)
if
hub_model_handle_list
:
for
hub_model_handle
in
hub_model_handle_list
.
split
(
';'
):
# Converts a model handle of the form
# https://tfhub.dev/google/nnlm-en-dim128/1 to valid python method name
# like google_nnlm_en_dim128_1.
hub_model_method_name
=
hub_model_handle
.
replace
(
'https://tfhub.dev'
,
''
).
replace
(
'/'
,
'_'
).
replace
(
'-'
,
'_'
).
strip
(
'_'
)
setattr
(
self
,
'benchmark_'
+
hub_model_
handl
e
,
self
,
'benchmark_'
+
hub_model_
method_nam
e
,
functools
.
partial
(
self
.
benchmark_memory_usage
,
hub_model_handle
))
def
benchmark_memory_usage
(
...
...
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