Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
OpenFold
Commits
b9eede45
You need to sign in or sign up before continuing.
Commit
b9eede45
authored
Jul 19, 2022
by
Gustaf Ahdritz
Browse files
Rename pLDDT loss
parent
a83fcc01
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
openfold/utils/loss.py
openfold/utils/loss.py
+3
-1
No files found.
openfold/utils/loss.py
View file @
b9eede45
...
@@ -653,7 +653,9 @@ def compute_tm(
...
@@ -653,7 +653,9 @@ def compute_tm(
normed_residue_mask
=
residue_weights
/
(
eps
+
residue_weights
.
sum
())
normed_residue_mask
=
residue_weights
/
(
eps
+
residue_weights
.
sum
())
per_alignment
=
torch
.
sum
(
predicted_tm_term
*
normed_residue_mask
,
dim
=-
1
)
per_alignment
=
torch
.
sum
(
predicted_tm_term
*
normed_residue_mask
,
dim
=-
1
)
weighted
=
per_alignment
*
residue_weights
weighted
=
per_alignment
*
residue_weights
argmax
=
(
weighted
==
torch
.
max
(
weighted
)).
nonzero
()[
0
]
argmax
=
(
weighted
==
torch
.
max
(
weighted
)).
nonzero
()[
0
]
return
per_alignment
[
tuple
(
argmax
)]
return
per_alignment
[
tuple
(
argmax
)]
...
@@ -1557,7 +1559,7 @@ class AlphaFoldLoss(nn.Module):
...
@@ -1557,7 +1559,7 @@ class AlphaFoldLoss(nn.Module):
batch
,
batch
,
self
.
config
.
fape
,
self
.
config
.
fape
,
),
),
"lddt"
:
lambda
:
lddt_loss
(
"
p
lddt
_loss
"
:
lambda
:
lddt_loss
(
logits
=
out
[
"lddt_logits"
],
logits
=
out
[
"lddt_logits"
],
all_atom_pred_pos
=
out
[
"final_atom_positions"
],
all_atom_pred_pos
=
out
[
"final_atom_positions"
],
**
{
**
batch
,
**
self
.
config
.
lddt
},
**
{
**
batch
,
**
self
.
config
.
lddt
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment