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
c69053e5
"vscode:/vscode.git/clone" did not exist on "bcc6d97b69775ffa14cb37cb0cacd7b7e7a0b850"
Commit
c69053e5
authored
Jun 28, 2023
by
Geoffrey Yu
Browse files
added batch_size dimension
parent
15105078
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
tests/test_permutation.py
tests/test_permutation.py
+9
-3
No files found.
tests/test_permutation.py
View file @
c69053e5
...
@@ -92,9 +92,15 @@ class TestPermutation(unittest.TestCase):
...
@@ -92,9 +92,15 @@ class TestPermutation(unittest.TestCase):
add_recycling_dims
=
lambda
t
:
(
add_recycling_dims
=
lambda
t
:
(
t
.
unsqueeze
(
-
1
).
expand
(
*
t
.
shape
,
c
.
data
.
common
.
max_recycling_iters
)
t
.
unsqueeze
(
-
1
).
expand
(
*
t
.
shape
,
c
.
data
.
common
.
max_recycling_iters
)
)
)
add_batch_size_dimension
=
lambda
t
:
(
t
.
unsqueeze
(
0
)
)
batch
=
tensor_tree_map
(
add_recycling_dims
,
batch
)
batch
=
tensor_tree_map
(
add_recycling_dims
,
batch
)
batch
=
tensor_tree_map
(
add_batch_size_dimension
,
batch
)
for
k
,
v
in
batch
.
items
():
print
(
f
"
{
k
}
:
{
v
.
shape
}
"
)
with
torch
.
no_grad
():
with
torch
.
no_grad
():
out
=
model
(
batch
)
out
=
model
(
batch
)
permutated_labels
=
multimer_loss
(
out
,(
batch
,
example_label
))
print
(
f
"finished foward on batch with batch_size dim"
)
print
(
f
"permuated_labels is
{
type
(
permutated_labels
)
}
and keys are:
\n
{
permutated_labels
.
keys
()
}
"
)
# permutated_labels = multimer_loss(out,(batch,example_label))
\ No newline at end of file
# print(f"permuated_labels is {type(permutated_labels)} and keys are:\n {permutated_labels.keys()}")
\ No newline at end of file
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