Skip to content

[FEATURE] How to get attention scores of each layer in ViT-like models #1584

@jpWang

Description

@jpWang

Hi, thanks for your great work !
And I want to ask that if we difine a ViT-like model such as
model=timm.create_model('vit_small_patch16_224_in21k', pretrained=True) ,
how to get attention score matrixs of each layer in it ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions