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
07421c47
"vscode:/vscode.git/clone" did not exist on "a82f350a0c63cfa125fce23d30630ca2608d2cb6"
Commit
07421c47
authored
Jun 29, 2023
by
Geoffrey Yu
Browse files
start working on masked_msa_loss error
parent
1df55b4e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
openfold/utils/loss.py
openfold/utils/loss.py
+2
-0
No files found.
openfold/utils/loss.py
View file @
07421c47
...
...
@@ -542,6 +542,7 @@ def lddt_loss(
eps
=
eps
)
score
=
torch
.
nan_to_num
(
score
,
nan
=
torch
.
nanmean
(
score
))
score
[
score
<
0
]
=
0
score
=
score
.
detach
()
bin_index
=
torch
.
floor
(
score
*
no_bins
).
long
()
bin_index
=
torch
.
clamp
(
bin_index
,
max
=
(
no_bins
-
1
))
...
...
@@ -1605,6 +1606,7 @@ def masked_msa_loss(logits, true_msa, bert_mask, num_classes, eps=1e-8, **kwargs
Returns:
Masked MSA loss
"""
print
(
f
"line 1609 logits shape:
{
logits
.
shape
}
and num_classes:
{
num_classes
}
"
)
errors
=
softmax_cross_entropy
(
logits
,
torch
.
nn
.
functional
.
one_hot
(
true_msa
,
num_classes
=
num_classes
)
)
...
...
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