Skip to content
This repository has been archived by the owner on Aug 1, 2024. It is now read-only.

Predict which residues are the most important #113

Answered by tomsercu
Mark-a-Lis asked this question in Q&A
Discussion options

You must be logged in to vote

The straightforward way to do this is to mask the token under consideration (there is some existing discussion on how to do this, a repo update to make this easier is upcoming too).
Then with result = model(masked_sequences), you'll find result['logits'], per sequence it'll be size L x K (seqlen x alphabet_size). To make it a probability distribution, use F.softmax. Then you can compute for example the per-position entropy: (p * p.log()).sum(-1)

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@tomsercu
Comment options

@Mark-a-Lis
Comment options

@bj600800
Comment options

Answer selected by Mark-a-Lis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants