This repository has been archived by the owner on Nov 1, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix zero gradient for subtensor assignment.
The variable that is being assigned has its gradient correctly calculated (g[k]) but later on when the gradient of the variable being assigned to is calculated g[k] is set to 0. This gives the correct gradient for the variable being assigned to, but because it shares the same storage it actually overrides the earlier gradient incorrectly to zero. This fixes that.
- Loading branch information