-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Assert that weights and gradWeights line up in getParameters
Adds a check that the parameters have the same offset as their gradients after getParameters is called. If they do not line up, then methods such as torch/optim will not work. This could happen if the sharing of weights and gradWeights do not match or, due to a bug in the implementation of getParameters, if the storages of weights and gradWeights do not closely correspond. Fix getParameters tests to always share gradWeights when sharing weights.
- Loading branch information
Showing
2 changed files
with
43 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters