Skip to content

Commit

Permalink
Update utils.py (#338)
Browse files Browse the repository at this point in the history
  • Loading branch information
farhadrgh committed Oct 15, 2019
1 parent 053f086 commit 18e63f1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions torchani/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,8 @@ def forward(self, species_energies):
"""(species, molecular energies)->(species, molecular energies + sae)
"""
species, energies = species_energies
sae = self.sae(species).to(energies.dtype).to(energies.device)
return species, energies + sae
sae = self.sae(species).to(energies.device)
return species, energies.to(sae.dtype) + sae


class ChemicalSymbolsToInts:
Expand Down

0 comments on commit 18e63f1

Please sign in to comment.