how visualize attention matrix

#7
by francescopatane - opened

hi. i'm doing some researches on protein language models and i'd like to plot the attention matrix after sequence token classification ... how cain i perform that? thank you
francesco

Hi Francesco, you can call the model with output_attentions=True to return the attention matrix for each attention head. It's up to you how you plot that data, though!

Thank you Matthew, i appreciate!

Sign up or log in to comment