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
d2cf0f50
Commit
d2cf0f50
authored
Jul 08, 2022
by
Gustaf Ahdritz
Browse files
Minor reformatting & default change
parent
0d148a7d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
openfold/model/pair_transition.py
openfold/model/pair_transition.py
+2
-2
openfold/utils/chunk_utils.py
openfold/utils/chunk_utils.py
+2
-2
No files found.
openfold/model/pair_transition.py
View file @
d2cf0f50
...
...
@@ -54,7 +54,8 @@ class PairTransition(nn.Module):
z
=
self
.
relu
(
z
)
# [*, N_res, N_res, C_z]
z
=
self
.
linear_2
(
z
)
*
mask
z
=
self
.
linear_2
(
z
)
z
=
z
*
mask
return
z
...
...
@@ -71,7 +72,6 @@ class PairTransition(nn.Module):
no_batch_dims
=
len
(
z
.
shape
[:
-
2
]),
)
def
forward
(
self
,
z
:
torch
.
Tensor
,
mask
:
Optional
[
torch
.
Tensor
]
=
None
,
...
...
openfold/utils/chunk_utils.py
View file @
d2cf0f50
...
...
@@ -343,7 +343,7 @@ class ChunkSizeTuner:
def
__init__
(
self
,
# Heuristically, runtimes for most of the modules in the network
# plateau earlier than this on all GPUs I've run the model on.
max_chunk_size
=
256
,
max_chunk_size
=
512
,
):
self
.
max_chunk_size
=
max_chunk_size
self
.
cached_chunk_size
=
None
...
...
@@ -402,7 +402,7 @@ class ChunkSizeTuner:
representative_fn
:
Callable
,
args
:
Tuple
[
Any
],
min_chunk_size
:
int
,
)
->
int
:
)
->
int
:
consistent
=
True
remove_tensors
=
lambda
a
:
a
.
shape
if
type
(
a
)
is
torch
.
Tensor
else
a
arg_data
=
tree_map
(
remove_tensors
,
args
,
object
)
...
...
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