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
f9fe0fe9
Commit
f9fe0fe9
authored
Aug 29, 2019
by
A. Unique TensorFlower
Browse files
Internal change
PiperOrigin-RevId: 266242786
parent
dcd0e7ad
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
0 deletions
+36
-0
official/recommendation/ncf_keras_benchmark.py
official/recommendation/ncf_keras_benchmark.py
+36
-0
No files found.
official/recommendation/ncf_keras_benchmark.py
View file @
f9fe0fe9
...
@@ -31,6 +31,7 @@ from official.utils.flags import core
...
@@ -31,6 +31,7 @@ from official.utils.flags import core
FLAGS
=
flags
.
FLAGS
FLAGS
=
flags
.
FLAGS
NCF_DATA_DIR_NAME
=
'movielens_data'
NCF_DATA_DIR_NAME
=
'movielens_data'
NCF_TF_DATA_1M_BATCH_DIR_NAME
=
'gs://tf-perfzero-data/movielens_data/ncf_8gpu_1M_batch'
class
NCFKerasBenchmarkBase
(
tf
.
test
.
Benchmark
):
class
NCFKerasBenchmarkBase
(
tf
.
test
.
Benchmark
):
...
@@ -339,6 +340,41 @@ class NCFKerasAccuracy(NCFKerasBenchmarkBase):
...
@@ -339,6 +340,41 @@ class NCFKerasAccuracy(NCFKerasBenchmarkBase):
FLAGS
.
epsilon
=
1e-8
FLAGS
.
epsilon
=
1e-8
self
.
_run_and_report_benchmark_mlperf_like
()
self
.
_run_and_report_benchmark_mlperf_like
()
def
benchmark_8_gpu_tf_data_ctl_mlperf_like
(
self
):
"""8 GPU using CTL."""
self
.
_setup
()
FLAGS
.
keras_use_ctl
=
True
FLAGS
.
num_gpus
=
8
FLAGS
.
train_epochs
=
17
FLAGS
.
batch_size
=
1048576
FLAGS
.
eval_batch_size
=
1048000
FLAGS
.
learning_rate
=
0.0045
FLAGS
.
beta1
=
0.25
FLAGS
.
beta2
=
0.5
FLAGS
.
epsilon
=
1e-8
FLAGS
.
train_dataset_path
=
os
.
path
.
join
(
NCF_TF_DATA_1M_BATCH_DIR_NAME
,
"training_cycle_*/*"
)
FLAGS
.
eval_dataset_path
=
os
.
path
.
join
(
NCF_TF_DATA_1M_BATCH_DIR_NAME
,
"eval_data/*"
)
FLAGS
.
input_meta_data_path
=
os
.
path
.
join
(
NCF_TF_DATA_1M_BATCH_DIR_NAME
,
"meta_data.json"
)
self
.
_run_and_report_benchmark_mlperf_like
()
def
benchmark_8_gpu_tf_data_ctl_fp16_mlperf_like
(
self
):
"""8 GPU using CTL."""
self
.
_setup
()
FLAGS
.
keras_use_ctl
=
True
FLAGS
.
num_gpus
=
8
FLAGS
.
train_epochs
=
17
FLAGS
.
batch_size
=
1048576
FLAGS
.
eval_batch_size
=
1048000
FLAGS
.
learning_rate
=
0.0045
FLAGS
.
beta1
=
0.25
FLAGS
.
beta2
=
0.5
FLAGS
.
epsilon
=
1e-8
FLAGS
.
dtype
=
'fp16'
FLAGS
.
loss_scale
=
8192
FLAGS
.
train_dataset_path
=
os
.
path
.
join
(
NCF_TF_DATA_1M_BATCH_DIR_NAME
,
"training_cycle_*/*"
)
FLAGS
.
eval_dataset_path
=
os
.
path
.
join
(
NCF_TF_DATA_1M_BATCH_DIR_NAME
,
"eval_data/*"
)
FLAGS
.
input_meta_data_path
=
os
.
path
.
join
(
NCF_TF_DATA_1M_BATCH_DIR_NAME
,
"meta_data.json"
)
self
.
_run_and_report_benchmark_mlperf_like
()
class
NCFKerasSynth
(
NCFKerasBenchmarkBase
):
class
NCFKerasSynth
(
NCFKerasBenchmarkBase
):
"""Benchmark NCF model using synthetic data."""
"""Benchmark NCF model using synthetic data."""
...
...
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