Skip to content
This repository has been archived by the owner on Jul 7, 2023. It is now read-only.

Loss twice multiplied with loss_coef #1627

Merged
merged 1 commit into from
Jul 18, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tensor2tensor/utils/expert_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1044,7 +1044,7 @@ def local_moe(x,
noisy_gating=True,
noise_epsilon=1e-2)
importance = tf.reduce_sum(gates, 0)
loss = loss_coef * (cv_squared(importance) + cv_squared(load))
loss = (cv_squared(importance) + cv_squared(load))
else:
assert hparams.gating_type == "vq"
tf.logging.info("Using VQ gating")
Expand Down