-
Notifications
You must be signed in to change notification settings - Fork 341
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix gradient shape error for DPMultiheadAttention (issue 650) (#651)
Summary: Pull Request resolved: #651 When batch_first = True, the activation and partial gradient for each linear layer in DPMultiheadAttention still has batch_size in the second dimension, thus causing wrong gradient shape in optimizer.step(). Details in: #650 Reviewed By: EnayatUllah Differential Revision: D57446245 fbshipit-source-id: c0f0e3643c802e51afe7ddb6bb054e5447845f32
- Loading branch information
1 parent
7d65ddf
commit 202c58a
Showing
1 changed file
with
14 additions
and
15 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