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
1df55b4e
Commit
1df55b4e
authored
Jun 29, 2023
by
Geoffrey Yu
Browse files
fixed lddt_loss nan error
parent
edb4858e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
2 deletions
+1
-2
openfold/utils/loss.py
openfold/utils/loss.py
+1
-2
No files found.
openfold/utils/loss.py
View file @
1df55b4e
...
@@ -541,9 +541,8 @@ def lddt_loss(
...
@@ -541,9 +541,8 @@ def lddt_loss(
cutoff
=
cutoff
,
cutoff
=
cutoff
,
eps
=
eps
eps
=
eps
)
)
score
=
torch
.
nan_to_num
(
score
,
nan
=
torch
.
nanmean
(
score
))
score
=
score
.
detach
()
score
=
score
.
detach
()
bin_index
=
torch
.
floor
(
score
*
no_bins
).
long
()
bin_index
=
torch
.
floor
(
score
*
no_bins
).
long
()
bin_index
=
torch
.
clamp
(
bin_index
,
max
=
(
no_bins
-
1
))
bin_index
=
torch
.
clamp
(
bin_index
,
max
=
(
no_bins
-
1
))
lddt_ca_one_hot
=
torch
.
nn
.
functional
.
one_hot
(
lddt_ca_one_hot
=
torch
.
nn
.
functional
.
one_hot
(
...
...
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