-
I used to get attention scores from different vision transformer blocks using f'blocks.{str(i)}.attn.softmax' (where i is something from 0 to the num of layers of the model -1). Now I updated my timm and can't find this layer in the ViTs anymore. If I run get_graph_node_names these are the only nodes I get from the attention module: 'backbone.blocks.11.norm1', Which, unfortunately, gives only pre-self-attention activations or the last projections. I can't figure out which version I was using before, but it would be nice to be able to get this specific softmax activation in newer versions as well |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
My temporary solution:
Then
|
Beta Was this translation helpful? Give feedback.
@scabini F.sdpa makes it inaccessible,
export TIMM_FUSED_ATTN=0
in your environment ortimm.layers.set_fused_attn(False)
in your program before creating the model