Skip to content

Commit

Permalink
Use modern type annotations for models.py (#374)
Browse files Browse the repository at this point in the history
  • Loading branch information
zasdfgbnm authored and farhadrgh committed Nov 7, 2019
1 parent 2c0e6df commit 7499c8d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions torchani/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"""

import torch
from torch import Tensor
from typing import Tuple
from pkg_resources import resource_filename
from . import neurochem
Expand Down Expand Up @@ -88,8 +89,7 @@ def __init__(self, info_file):
self.neural_networks = neurochem.load_model_ensemble(
self.species, self.ensemble_prefix, self.ensemble_size)

def forward(self, species_coordinates):
# type: (Tuple[torch.Tensor, torch.Tensor]) -> Tuple[torch.Tensor, torch.Tensor]
def forward(self, species_coordinates: Tuple[Tensor, Tensor]) -> Tuple[Tensor, Tensor]:
"""Calculates predicted properties for minibatch of configurations
Args:
Expand Down

0 comments on commit 7499c8d

Please sign in to comment.