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
7059e9a6
Unverified
Commit
7059e9a6
authored
Jun 02, 2020
by
Ignacio Pickering
Committed by
GitHub
Jun 02, 2020
Browse files
Add a function to recast all buffer tensors (#473)
* Add a function to recast all buffer tensors * flake8
parent
ad7cad50
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
torchani/models.py
torchani/models.py
+5
-0
No files found.
torchani/models.py
View file @
7059e9a6
...
@@ -95,6 +95,11 @@ class BuiltinNet(torch.nn.Module):
...
@@ -95,6 +95,11 @@ class BuiltinNet(torch.nn.Module):
self
.
neural_networks
=
neurochem
.
load_model_ensemble
(
self
.
neural_networks
=
neurochem
.
load_model_ensemble
(
self
.
species
,
self
.
ensemble_prefix
,
self
.
ensemble_size
)
self
.
species
,
self
.
ensemble_prefix
,
self
.
ensemble_size
)
@
torch
.
jit
.
export
def
_recast_long_buffers
(
self
):
self
.
species_converter
.
conv_tensor
=
self
.
species_converter
.
conv_tensor
.
to
(
dtype
=
torch
.
long
)
self
.
aev_computer
.
triu_index
=
self
.
aev_computer
.
triu_index
.
to
(
dtype
=
torch
.
long
)
def
forward
(
self
,
species_coordinates
:
Tuple
[
Tensor
,
Tensor
],
def
forward
(
self
,
species_coordinates
:
Tuple
[
Tensor
,
Tensor
],
cell
:
Optional
[
Tensor
]
=
None
,
cell
:
Optional
[
Tensor
]
=
None
,
pbc
:
Optional
[
Tensor
]
=
None
)
->
SpeciesEnergies
:
pbc
:
Optional
[
Tensor
]
=
None
)
->
SpeciesEnergies
:
...
...
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