Commit 584d0725 authored by Yong Tang's avatar Yong Tang Committed by Jonathan Hseu
Browse files

Fix warnings in `nn.sampled_softmax_loss` (#18494)



* Fix warnings in `nn.sampled_softmax_loss`

The softmax_cross_entropy_with_logits has been deprecated
and replaced with softmax_cross_entropy_with_logits_v2.
This causes nn.sampled_softmax_loss to always generate
a WANRING whenever called. This fix replaces
`softmax_cross_entropy_with_logits` with `softmax_cross_entropy_with_logits_v2`
and maintains the existing behavior to fix the warning.

Signed-off-by: default avatarYong Tang <yong.tang.github@outlook.com>

* Pylint fix for line too long

Signed-off-by: default avatarYong Tang <yong.tang.github@outlook.com>
parent 889a63b6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment