-
Notifications
You must be signed in to change notification settings - Fork 25.1k
Closed
Labels
module: bc-breakingRelated to a BC-breaking changeRelated to a BC-breaking changetriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module
Description
🐛 Bug
MultiHeadAttention
does not respect bias=False
in the output projection. It seems that it was changed as part of a PR: eace053#diff-61bd5e4f390b965228ead6bb0efcad5b9b5299d833bcf5c2aa11ebaebb39ba29L794
Is this the intended behavior?
To Reproduce
Steps to reproduce the behavior:
- Create a MultiHeadAttention module with
torch.nn.MultiheadAttention(N, H, bias=False)
- The module's
out_proj
field as a non-None, nonzero bias
Expected behavior
The bias in out_proj
should be None.
Environment
- PyTorch Version (e.g., 1.0): 1.7.1 and latest master
- OS (e.g., Linux): All
- How you installed PyTorch (
conda
,pip
, source):conda
- Build command you used (if compiling from source): N/A
- Python version: 3.8
- CUDA/cuDNN version: N/A
- GPU models and configuration: N/A
- Any other relevant information: N/A
Additional context
N/A
Metadata
Metadata
Assignees
Labels
module: bc-breakingRelated to a BC-breaking changeRelated to a BC-breaking changetriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module