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
a829e648
"examples/vscode:/vscode.git/clone" did not exist on "8874e83059797c54f3485a123ec69ab54598fee9"
Commit
a829e648
authored
Jul 23, 2020
by
A. Unique TensorFlower
Browse files
Internal change
PiperOrigin-RevId: 322844988
parent
ee3bfa1e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
official/recommendation/ncf_keras_main.py
official/recommendation/ncf_keras_main.py
+6
-6
No files found.
official/recommendation/ncf_keras_main.py
View file @
a829e648
...
@@ -488,19 +488,19 @@ def run_ncf_custom_training(params,
...
@@ -488,19 +488,19 @@ def run_ncf_custom_training(params,
c
.
on_batch_end
(
current_step
)
c
.
on_batch_end
(
current_step
)
train_loss
/=
num_train_steps
train_loss
/=
num_train_steps
logging
.
info
(
"Done training epoch %s, epoch loss=%
s
."
,
epoch
+
1
,
logging
.
info
(
"Done training epoch %s, epoch loss=%.
3f
"
,
epoch
+
1
,
train_loss
)
train_loss
)
eval_input_iterator
=
iter
(
eval_input_iterator
=
iter
(
eval_input_dataset
)
strategy
.
experimental_distribute_dataset
(
eval_input_dataset
))
hr_sum
=
0
hr_sum
=
0
.0
hr_count
=
0
hr_count
=
0
.0
for
_
in
range
(
num_eval_steps
):
for
_
in
range
(
num_eval_steps
):
step_hr_sum
,
step_hr_count
=
eval_step
(
eval_input_iterator
)
step_hr_sum
,
step_hr_count
=
eval_step
(
eval_input_iterator
)
hr_sum
+=
step_hr_sum
hr_sum
+=
step_hr_sum
hr_count
+=
step_hr_count
hr_count
+=
step_hr_count
logging
.
info
(
"Done eval epoch %s, hit_rate=%
s
."
,
epoch
+
1
,
logging
.
info
(
"Done eval epoch %s, hit_rate=%.
3f
"
,
epoch
+
1
,
hr_sum
/
hr_count
)
hr_sum
/
hr_count
)
if
eval_summary_writer
:
if
eval_summary_writer
:
with
eval_summary_writer
.
as_default
():
with
eval_summary_writer
.
as_default
():
...
...
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