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
9ebb1e1a
Commit
9ebb1e1a
authored
Jun 29, 2023
by
Geoffrey Yu
Browse files
updated the loss config so that the masked msa dim is 22 instead of 23
parent
07421c47
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
tests/test_permutation.py
tests/test_permutation.py
+11
-0
No files found.
tests/test_permutation.py
View file @
9ebb1e1a
...
@@ -63,6 +63,8 @@ class TestPermutation:
...
@@ -63,6 +63,8 @@ class TestPermutation:
n_extra_seq
=
consts
.
n_extra
n_extra_seq
=
consts
.
n_extra
c
=
model_config
(
consts
.
model
,
train
=
True
)
c
=
model_config
(
consts
.
model
,
train
=
True
)
c
.
loss
.
masked_msa
.
num_classes
=
22
# somehow need overwrite this part in multimer loss config
c
.
model
.
evoformer_stack
.
no_blocks
=
4
# no need to go overboard here
c
.
model
.
evoformer_stack
.
no_blocks
=
4
# no need to go overboard here
c
.
model
.
evoformer_stack
.
blocks_per_ckpt
=
None
# don't want to set up
c
.
model
.
evoformer_stack
.
blocks_per_ckpt
=
None
# don't want to set up
# deepspeed for this test
# deepspeed for this test
...
@@ -88,6 +90,15 @@ class TestPermutation:
...
@@ -88,6 +90,15 @@ class TestPermutation:
}
}
batch
[
'backbone_rigid_tensor'
]
=
self
.
affine_vector_to_4x4
(
backbone_dict
[
'backbone_affine_tensor'
])
batch
[
'backbone_rigid_tensor'
]
=
self
.
affine_vector_to_4x4
(
backbone_dict
[
'backbone_affine_tensor'
])
batch
[
'backbone_rigid_mask'
]
=
backbone_dict
[
'backbone_affine_mask'
]
batch
[
'backbone_rigid_mask'
]
=
backbone_dict
[
'backbone_affine_mask'
]
true_msa_dict
=
{
"true_msa"
:
torch
.
tensor
(
np
.
random
.
randint
(
0
,
21
,
(
n_res
,
n_seq
))),
"bert_mask"
:
torch
.
tensor
(
np
.
random
.
randint
(
0
,
2
,
(
n_res
,
n_seq
)).
astype
(
np
.
float32
)
)
}
batch
.
update
(
true_msa_dict
)
batch
[
"msa_feat"
]
=
torch
.
rand
((
n_seq
,
n_res
,
c
.
model
.
input_embedder
.
msa_dim
))
batch
[
"msa_feat"
]
=
torch
.
rand
((
n_seq
,
n_res
,
c
.
model
.
input_embedder
.
msa_dim
))
t_feats
=
random_template_feats
(
n_templ
,
n_res
)
t_feats
=
random_template_feats
(
n_templ
,
n_res
)
...
...
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