HawkAaron commented on a change in pull request #11834: Fix mxnet ctc_loss bug
URL: https://github.com/apache/incubator-mxnet/pull/11834#discussion_r205634439
##########
File path: src/operator/contrib/ctc_include/detail/gpu_ctc.h
##########
@@ -411,12 +411,7 @@ GpuCTC<ProbT>::compute_log_probs(const ProbT* const
activations) {
denoms_, out_dim_, num_elements);
// compute denominators for softmax
- denoms_handle = reduce_with_axis<red::sum, false>(
- F<mxnet::op::mshadow_op::exp>(
- log_probs_handle -
- broadcast<0>(reduce_with_axis<red::maximum,
false>(log_probs_handle, 1),
Review comment:
the max is reduced in here:
https://github.com/apache/incubator-mxnet/blob/master/src/operator/contrib/ctc_include/detail/gpu_ctc.h#L398
and `log_probs -= denoms` is in here:
https://github.com/apache/incubator-mxnet/blob/master/src/operator/contrib/ctc_include/detail/gpu_ctc.h#L409
that means the broadcast line
(https://github.com/apache/incubator-mxnet/blob/master/src/operator/contrib/ctc_include/detail/gpu_ctc.h#L417)
should be zero
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services