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
ad2e5c97
Commit
ad2e5c97
authored
Sep 27, 2021
by
Gustaf Ahdritz
Browse files
Fix OPM bug
parent
b2d102cb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
openfold/model/outer_product_mean.py
openfold/model/outer_product_mean.py
+2
-2
No files found.
openfold/model/outer_product_mean.py
View file @
ad2e5c97
...
...
@@ -50,7 +50,7 @@ class OuterProductMean(nn.Module):
def
_opm
(
self
,
a
,
b
):
# [*, N_res, N_res, C, C]
outer
=
torch
.
einsum
(
"...bac,...dae->...bdce"
,
a
,
b
)
# [*, N_res, N_res, C * C]
outer
=
outer
.
reshape
(
*
outer
.
shape
[:
-
2
],
-
1
)
...
...
@@ -107,7 +107,7 @@ class OuterProductMean(nn.Module):
norm
=
torch
.
einsum
(
"...abc,...adc->...bdc"
,
mask
,
mask
)
# [*, N_res, N_res, C_z]
outer
=
outer
/
self
.
eps
+
norm
outer
=
outer
/
(
self
.
eps
+
norm
)
return
outer
...
...
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