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
torchani
Commits
987711c7
"server/text_generation_server/models/t5.py" did not exist on "54fec9319371b2792526e0cbfebe6cee66ed3980"
Commit
987711c7
authored
Dec 16, 2019
by
Richard Xue
Committed by
Gao, Xiang
Dec 16, 2019
Browse files
fix new dataset reshape bug (#405)
parent
abc8f7f8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
torchani/data/new.py
torchani/data/new.py
+2
-2
No files found.
torchani/data/new.py
View file @
987711c7
...
...
@@ -554,7 +554,7 @@ def collate_fn(data, chunk_threshold, properties_info):
padding_value
=-
1
)
batch_coordinates
=
torch
.
nn
.
utils
.
rnn
.
pad_sequence
(
batch_coordinates
,
batch_first
=
True
,
padding_value
=
0
)
padding_value
=
np
.
inf
)
# sort - time: 0.7s
atoms
=
torch
.
sum
(
~
(
batch_species
==
-
1
),
dim
=-
1
,
dtype
=
torch
.
int32
)
...
...
@@ -574,7 +574,7 @@ def collate_fn(data, chunk_threshold, properties_info):
# truncate redundant padding - time: 1.3s
chunks_batch_species
=
trunc_pad
(
list
(
chunks_batch_species
),
padding_value
=-
1
)
chunks_batch_coordinates
=
trunc_pad
(
list
(
chunks_batch_coordinates
))
chunks_batch_coordinates
=
trunc_pad
(
list
(
chunks_batch_coordinates
)
,
padding_value
=
np
.
inf
)
for
i
,
c
in
enumerate
(
chunks_batch_coordinates
):
chunks_batch_coordinates
[
i
]
=
c
.
reshape
(
c
.
shape
[
0
],
-
1
,
3
)
...
...
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