Skip to content

Commit

Permalink
reverse issues with decoder
Browse files Browse the repository at this point in the history
  • Loading branch information
VarunAnanth2003 committed Oct 2, 2024
1 parent e35c60d commit 79cba59
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion casanovo/denovo/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -1148,7 +1148,7 @@ def _calc_match_score(
(for an entire batch)
"""
# Remove trailing tokens from predictions based on decoder reversal
if decoder_reverse:
if not decoder_reverse:
batch_all_aa_scores = batch_all_aa_scores[:, 1:]
else:
batch_all_aa_scores = batch_all_aa_scores[:, :-1]
Expand All @@ -1163,6 +1163,8 @@ def _calc_match_score(

per_aa_scores = batch_all_aa_scores[rows, cols, truth_aa_indices]

logging.debug("$$$$$$$$$$$$$||%s||$$$$$$$$$$$$$$", per_aa_scores)

per_aa_scores[per_aa_scores == 0] += 1e-10
score_mask = truth_aa_indices != 0
per_aa_scores[~score_mask] = 0
Expand Down

0 comments on commit 79cba59

Please sign in to comment.