
摘要
点积注意力在计算机视觉和自然语言处理中有着广泛的应用。然而,其内存和计算成本随着输入规模的增加而呈二次增长。这种增长限制了其在高分辨率输入上的应用。为了解决这一缺点,本文提出了一种新型高效的注意力机制,该机制在保持与点积注意力等效的同时,显著降低了内存和计算成本。资源效率的提高使得注意力模块可以更广泛且灵活地集成到网络中,从而提高了模型的准确性。实证评估证明了其优势的有效性。高效的注意力模块在MS-COCO 2017数据集上显著提升了目标检测器和实例分割器的性能。此外,资源效率的提升使得复杂的模型也能使用注意力机制,而在这些模型中,高昂的成本通常会禁止使用点积注意力。以立体深度估计为例,在Scene Flow数据集上,一种具有高效注意力机制的模型达到了最先进的精度。代码可在https://github.com/cmsflash/efficient-attention 获取。
代码仓库
HighCWu/stylegan2-paddle
pytorch
GitHub 中提及
lucidrains/stylegan2-pytorch
pytorch
GitHub 中提及
Bakikii/stylegan2-pytorch23
pytorch
GitHub 中提及
96jonesa/StyleGan2-Colab-Demo
pytorch
GitHub 中提及
SiavashCS/sgan_simple
pytorch
GitHub 中提及
lucidrains/linear-attention-transformer
pytorch
GitHub 中提及
ShreyasArthur/StyleGAN-2-with-Urban-Plans
pytorch
GitHub 中提及
cmsflash/efficient-attention
官方
pytorch
GitHub 中提及
lucidrains/DALLE2-pytorch
pytorch
GitHub 中提及
lucidrains/En-transformer
pytorch
GitHub 中提及
Di-Is/stylegan2-ada-pytorch
pytorch
GitHub 中提及
lucidrains/memory-transformer-xl
pytorch
GitHub 中提及
基准测试
| 基准 | 方法 | 指标 |
|---|---|---|
| extractive-text-summarization-on-govreport | HEPOS | Avg. Test Rouge1: 56.86 Avg. Test Rouge2: 22.62 Avg. Test RougeLsum: 53.82 |