Skip to content

Commit 84659c9

Browse files
authored
Fix issue in TM computation
1 parent b2d6bff commit 84659c9

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

openfold/utils/loss.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -640,9 +640,7 @@ def compute_tm(
640640
)
641641

642642
bin_centers = _calculate_bin_centers(boundaries)
643-
torch.sum(residue_weights)
644-
n = logits.shape[-2]
645-
clipped_n = max(n, 19)
643+
clipped_n = max(torch.sum(residue_weights), 19)
646644

647645
d0 = 1.24 * (clipped_n - 15) ** (1.0 / 3) - 1.8
648646

0 commit comments

Comments
 (0)