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 2019/01/25 15:23:24 UTC

[GitHub] adrianloy edited a comment on issue #9712: two consecutive backward cause error Check failed: type_ != nullptr The any container is empty requested

adrianloy edited a comment on issue #9712: two consecutive backward cause error Check failed: type_ != nullptr The any container is empty requested
URL: https://github.com/apache/incubator-mxnet/issues/9712#issuecomment-457607617
 
 
   I got the same error and stumbled on this issue. I think another and maybe cleaner way that solved the error for me was to do
   `autograd.backward(list_of_loss_arrays)`
   In your case it should be possible to do
   `autograd.backward([t_xentropy_losses, s_xentropy_losses])`
   
   Just commenting to help others who come across this. If anyone knows why
   ```
   for loss in list_of_loss_arrays:
       loss.backward()
   ```
   doesnt work, let me know. Its weird because i got that code snippet from the official mxnet training script to train image classification networks from scratch.

----------------------------------------------------------------
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