Skip to content

为什么论文中的CAM模块说明和代码中CAM实现不一样 #151

@0neNoth1ng

Description

@0neNoth1ng

Image
上图是在论文中的截图,高亮部分说要用attention的转置与原始图像reshape之后进行矩阵乘法,但是你们的代码中实现如下图所示:

Image

事实上并没有将attention进行转置变成attention.permute(0,2,1),而是直接使用attention与proj_value经行矩阵乘法

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions