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
e4d7f6d2
Commit
e4d7f6d2
authored
Jul 14, 2023
by
Geoffrey Yu
Browse files
need to change ground truth load mode to train to avoid loss error
parent
08a5be86
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
openfold/data/data_modules.py
openfold/data/data_modules.py
+3
-4
No files found.
openfold/data/data_modules.py
View file @
e4d7f6d2
...
@@ -503,8 +503,7 @@ class OpenFoldSingleMultimerDataset(torch.utils.data.Dataset):
...
@@ -503,8 +503,7 @@ class OpenFoldSingleMultimerDataset(torch.utils.data.Dataset):
data
=
self
.
_parse_mmcif
(
data
=
self
.
_parse_mmcif
(
path
,
mmcif_id
,
chain
,
alignment_dir
,
alignment_index
,
path
,
mmcif_id
,
chain
,
alignment_dir
,
alignment_index
,
)
)
# since it's ground truth features, change the mode to eval in order to avoid padding
ground_truth_feats
=
self
.
feature_pipeline
.
process_features
(
data
,
"train"
,
ground_truth_feats
=
self
.
feature_pipeline
.
process_features
(
data
,
"eval"
,
is_multimer
=
False
)
is_multimer
=
False
)
#remove recycling dimension
#remove recycling dimension
ground_truth_feats
=
tensor_tree_map
(
lambda
t
:
t
[...,
-
1
],
ground_truth_feats
)
ground_truth_feats
=
tensor_tree_map
(
lambda
t
:
t
[...,
-
1
],
ground_truth_feats
)
...
@@ -513,7 +512,7 @@ class OpenFoldSingleMultimerDataset(torch.utils.data.Dataset):
...
@@ -513,7 +512,7 @@ class OpenFoldSingleMultimerDataset(torch.utils.data.Dataset):
data
=
self
.
data_pipeline
.
process_core
(
data
=
self
.
data_pipeline
.
process_core
(
path
,
alignment_dir
,
alignment_index
,
path
,
alignment_dir
,
alignment_index
,
)
)
ground_truth_feats
=
self
.
feature_pipeline
.
process_features
(
data
,
"
eval
"
,
ground_truth_feats
=
self
.
feature_pipeline
.
process_features
(
data
,
"
train
"
,
is_multimer
=
False
)
is_multimer
=
False
)
ground_truth_feats
=
tensor_tree_map
(
lambda
t
:
t
[...,
-
1
],
ground_truth_feats
)
ground_truth_feats
=
tensor_tree_map
(
lambda
t
:
t
[...,
-
1
],
ground_truth_feats
)
ground_truth
.
append
(
ground_truth_feats
)
ground_truth
.
append
(
ground_truth_feats
)
...
@@ -527,7 +526,7 @@ class OpenFoldSingleMultimerDataset(torch.utils.data.Dataset):
...
@@ -527,7 +526,7 @@ class OpenFoldSingleMultimerDataset(torch.utils.data.Dataset):
alignment_index
=
alignment_index
,
alignment_index
=
alignment_index
,
_structure_index
=
structure_index
,
_structure_index
=
structure_index
,
)
)
ground_truth_feats
=
self
.
feature_pipeline
.
process_features
(
data
,
"
eval
"
,
ground_truth_feats
=
self
.
feature_pipeline
.
process_features
(
data
,
"
train
"
,
is_multimer
=
False
)
is_multimer
=
False
)
ground_truth_feats
=
tensor_tree_map
(
lambda
t
:
t
[...,
-
1
],
ground_truth_feats
)
ground_truth_feats
=
tensor_tree_map
(
lambda
t
:
t
[...,
-
1
],
ground_truth_feats
)
ground_truth
.
append
(
ground_truth_feats
)
ground_truth
.
append
(
ground_truth_feats
)
...
...
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