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
576174f0
"examples/bert/example_data/README.md" did not exist on "5cf7df974cf7d767be56d117e57a57faf86ac6b6"
Commit
576174f0
authored
Apr 28, 2022
by
Gustaf Ahdritz
Browse files
Fix bug in MSA chunking code
parent
de60b410
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
openfold/model/msa.py
openfold/model/msa.py
+6
-3
No files found.
openfold/model/msa.py
View file @
576174f0
...
...
@@ -12,7 +12,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from
functools
import
partial
import
math
import
torch
import
torch.nn
as
nn
...
...
@@ -93,13 +93,16 @@ class MSAAttention(nn.Module):
use_memory_efficient_kernel
:
bool
,
chunk_size
:
int
,
)
->
torch
.
Tensor
:
return
chunk_layer
(
mha
=
partial
(
self
.
mha
,
use_memory_efficient_kernel
=
use_memory_efficient_kernel
)
return
chunk_layer
(
mha
,
{
"q_x"
:
m
,
"kv_x"
:
m
,
"biases"
:
biases
,
"use_memory_efficient_kernel"
:
use_memory_efficient_kernel
,
},
chunk_size
=
chunk_size
,
no_batch_dims
=
len
(
m
.
shape
[:
-
2
])
...
...
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