Skip to content

Commit

Permalink
comments
Browse files Browse the repository at this point in the history
  • Loading branch information
matsen committed Oct 18, 2024
1 parent db2b79a commit bf749ed
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion netam/dasm.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,8 @@ def loss_of_batch(self, batch):

def build_selection_matrix_from_parent(self, parent: str):
# This is simpler than the equivalent in dnsm.py because we get the selection
# matrix directly.
# matrix directly. Note that selection_factors_of_aa_str does the exponentiation
# so this indeed gives us the selection factors, not the log selection factors.
parent = translate_sequence(parent)
selection_factors = self.model.selection_factors_of_aa_str(parent)
parent_idxs = sequences.aa_idx_array_of_str(parent)
Expand Down
3 changes: 2 additions & 1 deletion netam/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,8 @@ def __init__(self):
super().__init__()

def selection_factors_of_aa_str(self, aa_str: str) -> Tensor:
"""Do the forward method without gradients from an amino acid string.
"""Do the forward method then exponentiation without gradients from an amino
acid string.
Args:
aa_str: A string of amino acids.
Expand Down

0 comments on commit bf749ed

Please sign in to comment.