You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2018/08/17 18:56:22 UTC

[GitHub] thomelane commented on issue #8347: CTC Example Problem

thomelane commented on issue #8347: CTC Example Problem
URL: https://github.com/apache/incubator-mxnet/issues/8347#issuecomment-413958731
 
 
   @jiarenyf Good question. As I understand, this function is written to return two things: the ctc loss (which is being optimised and used for back-propagation) and the softmax over the classes across time which can then be used for other purposes (but we don't want to optimize for this).
   
   Since this `lstm_unroll` function returns a symbol, and ideally we'd want to call backwards on this resultant symbol, we need to make both components of the returned symbol losses (even if we don't really want to use the softmax part as a loss). Otherwise the symbol would expect to be passed a gradient when backward method is called (which we don't want).
   
   Given we've made the both losses with `MakeLoss` we have to then 'disable' the gradient propagation for the softmax component, and this is done with `BlockGrad`. So to answer your question I think we need to keep these lines.
   
   @ yajiedesign as the original author of this example, do you want to comment further?
   
   Otherwise, @indhub this issue is good to close, thanks!

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services