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
6da769b1
Commit
6da769b1
authored
Jun 11, 2019
by
guptapriya
Committed by
guptapriya
Jun 12, 2019
Browse files
fix loss scaling
parent
71c6a697
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
3 deletions
+1
-3
official/recommendation/ncf_keras_main.py
official/recommendation/ncf_keras_main.py
+1
-3
No files found.
official/recommendation/ncf_keras_main.py
View file @
6da769b1
...
@@ -235,12 +235,10 @@ def _get_keras_model(params):
...
@@ -235,12 +235,10 @@ def _get_keras_model(params):
from_logits
=
True
,
from_logits
=
True
,
reduction
=
"sum"
)
reduction
=
"sum"
)
loss_scale_factor
=
(
batch_size
)
#*
#tf.distribute.get_strategy().num_replicas_in_sync)
keras_model
.
add_loss
(
loss_obj
(
keras_model
.
add_loss
(
loss_obj
(
y_true
=
label_input
,
y_true
=
label_input
,
y_pred
=
softmax_logits
,
y_pred
=
softmax_logits
,
sample_weight
=
valid_pt_mask_input
)
*
1.0
/
loss_scale_factor
)
sample_weight
=
valid_pt_mask_input
)
*
1.0
/
batch_size
)
keras_model
.
summary
()
keras_model
.
summary
()
return
keras_model
return
keras_model
...
...
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