lucidrains/enformer-pytorch

Computing Contribution Scores

Prakash2403 opened this issue · 5 comments

From the paper:

To better understand what sequence elements Enformer is utilizing when making predictions, we computed two different gene expression contribution scores — input gradients (gradient × input and attention weights

I was just wondering how to compute input gradients and fetch the attention matrix for the given input. I'm not well versed with PyTorch, so I'm sorry if this is a noob question.

Hi,
I have the same question. How to compute the contribution scores (input x gradient) and attention.
If I missed a response on this issue, I apologize in advance.

Similar confusion here.