BlockGrad Bug #4731
Comments
Was because the gradient is zeros and it is a lonely zeros without connection to others, so the shape inference failed. Fixing this would be an interesting practice to hack Nnvm gradient module. Please see if you can attempt a fix There are two ways. Make block grad always return zeros-like, which contains shape constraint. Insert shape hint identity like in terminal leaf, to hope backward inference kicks in |
zeros-like doesn't get recognized in gradient aggregation. It also doesn't work for dangling output from slice |
zeros like's recognition can be added to gradient aggregation, which is not a big issue. Dangling output is a separated issue, which zeros also suffer, so I think that is beyond the scope of this issue. |
This issue is closed due to lack of activity in the last 90 days. Feel free to reopen if this is still an active issue. Thanks! |
Environment info
Operating System: Windows
Compiler: Visual Studio Community 2015
Package used (Python/R/Scala/Julia): Python
MXNet commit hash (
git rev-parse HEAD
): 949300dError Message:
Minimum reproducible example
What have you tried to solve it?
I meet this problem when trying to refactor the code of FGradient for BlockGrad. The following code will work correctly while the code above raises an error.
The text was updated successfully, but these errors were encountered: