Add broadcast support for softmax_cross_entropy_with_logits (#16784)
* Add broadcast support for softmax_cross_entropy_with_logits This fix tries to address the issue raised in 11534 where there was no broadcast support for SoftmaxCrossEntropyWithLogits. This fix adds the broadcast support for SoftmaxCrossEntropyWithLogits, and adds test cases for it. This fix fixes 11534. Signed-off-by:Yong Tang <yong.tang.github@outlook.com> * Add BroadcastBinaryOpOutputShapeFn for shape function This commit adds BroadcastBinaryOpOutputShapeFn, so that the implementation of BroadcastBinaryOpShapeFn coule be reused in SoftmaxCrossEntropyWithLogits. Signed-off-by:
Yong Tang <yong.tang.github@outlook.com> * Update the shape function of SoftmaxCrossEntropyWithLogits so that broadcast could be supported. Signed-off-by:
Yong Tang <yong.tang.github@outlook.com> * Add broadcast support for SoftmaxCrossEntropyWithLogits Signed-off-by:
Yong Tang <yong.tang.github@outlook.com> * Add broadcast support for SoftmaxCrossEntropyWithLogits with GPU Signed-off-by:
Yong Tang <yong.tang.github@outlook.com> * Reformat with clang-format Signed-off-by:
Yong Tang <yong.tang.github@outlook.com> * Fix shape test issues Signed-off-by:
Yong Tang <yong.tang.github@outlook.com> * Remove `_` for gen_nn_ops._softmax_cross_entropy_with_logits as `_` is not needed anymore with the recent changes Signed-off-by:
Yong Tang <yong.tang.github@outlook.com> * Sanitize nn_ops.cc with clang-format Signed-off-by:
Yong Tang <yong.tang.github@outlook.com> * Add broadcast examples for SoftmaxCrossEntropyWithLogits shape function Signed-off-by:
Yong Tang <yong.tang.github@outlook.com> * Add benchmark tests for trival cases Signed-off-by:
Yong Tang <yong.tang.github@outlook.com> * Fix pylint issue Signed-off-by:
Yong Tang <yong.tang.github@outlook.com>
Loading
Please sign in to comment