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
a420160f
"vscode:/vscode.git/clone" did not exist on "829e1cf54dcfaebc7969a2a014a0bfaa8c0d47bb"
Commit
a420160f
authored
Jun 28, 2023
by
Geoffrey Yu
Browse files
now check the batch_size in compute_tm function
parent
5e1af36e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
openfold/utils/loss.py
openfold/utils/loss.py
+2
-1
No files found.
openfold/utils/loss.py
View file @
a420160f
...
...
@@ -698,7 +698,8 @@ def compute_tm(
if
interface
and
(
asym_id
is
not
None
):
if
len
(
asym_id
.
shape
)
>
1
:
assert
len
(
asym_id
.
shape
)
<=
2
pair_mask
=
residue_weights
.
new_ones
((
1
,
n
,
n
),
dtype
=
torch
.
int32
)
batch_size
=
asym_id
.
shape
[
0
]
pair_mask
=
residue_weights
.
new_ones
((
batch_size
,
n
,
n
),
dtype
=
torch
.
int32
)
pair_mask
*=
(
asym_id
[...,
None
]
!=
asym_id
[...,
None
,
:]).
to
(
dtype
=
pair_mask
.
dtype
)
predicted_tm_term
*=
pair_mask
...
...
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