pytorch
61a7618f - [Quant][Eager] Copy MHA's batch_first attribute in prepare() (#91680)

Commit
3 years ago
[Quant][Eager] Copy MHA's batch_first attribute in prepare() (#91680) **Summary** Fixes #91571 MHA's batch_first attribute is not copied after `torch.quantization.prepare()`. Now we copy MHA's batch_first attribute in torch/ao/nn/quantizable/modules/activation.py: `MultiheadAttention.from_float()`. **Test plan** python test/test_quantization.py -k test_mha_batch_first_attr_is_copied_in_prepare Pull Request resolved: https://github.com/pytorch/pytorch/pull/91680 Approved by: https://github.com/jgong5, https://github.com/jerryzh168
Author
Committer
Parents
Loading