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
9285d94d
Commit
9285d94d
authored
Feb 03, 2022
by
Gustaf Ahdritz
Browse files
Remove undefined reference
parent
998155e9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
openfold/model/primitives.py
openfold/model/primitives.py
+10
-4
No files found.
openfold/model/primitives.py
View file @
9285d94d
...
@@ -410,10 +410,16 @@ class Attention(nn.Module):
...
@@ -410,10 +410,16 @@ class Attention(nn.Module):
Args:
Args:
q_x:
q_x:
[*, Q, C_q] query data
[*, Q, C_q] query data
k_x:
k
v
_x:
[*, K, C_k] key data
[*, K, C_k] key data
v_x:
biases:
[*, V, C_v] value data
List of biases that broadcast to [*, H, Q, K]
use_lma:
Whether to use low-memory attention
q_chunk_size:
Query chunk size (for LMA)
kv_chunk_size:
Key/Value chunk size (for LMA)
Returns
Returns
[*, Q, C_q] attention update
[*, Q, C_q] attention update
"""
"""
...
@@ -429,7 +435,7 @@ class Attention(nn.Module):
...
@@ -429,7 +435,7 @@ class Attention(nn.Module):
if
(
use_lma
):
if
(
use_lma
):
biases
=
[
biases
=
[
b
.
expand
(
b
.
shape
[:
-
2
]
+
(
q_x
.
shape
[
-
2
],)
+
(
k_x
.
shape
[
-
2
],))
b
.
expand
(
b
.
shape
[:
-
2
]
+
(
q_x
.
shape
[
-
2
],)
+
(
k
v
_x
.
shape
[
-
2
],))
for
b
in
biases
for
b
in
biases
]
]
...
...
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