twitter-archive / torch-autograd

Autograd automatically differentiates native Torch code
Apache License 2.0
560 stars 114 forks source link

Fix locals and layer norm gradient edge case. #154

Closed allanzelener closed 8 years ago

allanzelener commented 8 years ago

Changing p from global to local in all modules.

In layer normalization, moving addition of eps inside sqrt to prevent undefined gradient at sqrt(0).

alexbw commented 8 years ago

LGTM