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
1921ac99
Commit
1921ac99
authored
Jun 16, 2022
by
Gustaf Ahdritz
Browse files
Add support for public checkpoints
parent
d6b36a80
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
run_pretrained_openfold.py
run_pretrained_openfold.py
+10
-3
No files found.
run_pretrained_openfold.py
View file @
1921ac99
...
...
@@ -189,11 +189,18 @@ def main(args):
args
.
openfold_checkpoint_path
,
ckpt_path
,
)
else
:
ckpt_path
=
args
.
openfold_checkpoint_path
d
=
torch
.
load
(
ckpt_path
)
model
.
load_state_dict
(
d
[
"ema"
][
"params"
])
else
:
ckpt_path
=
args
.
openfold_checkpoint_path
d
=
torch
.
load
(
ckpt_path
)
if
(
"ema"
in
d
):
# The public weights have had this done to them already
d
=
d
[
"ema"
][
"params"
]
model
.
load_state_dict
(
d
)
else
:
raise
ValueError
(
"At least one of jax_param_path or openfold_checkpoint_path must "
...
...
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