Skip to content

Commit

Permalink
fix existing errors
Browse files Browse the repository at this point in the history
  • Loading branch information
pmeier committed Sep 15, 2020
1 parent 9282009 commit 54b6c14
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions torchvision/models/googlenet.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import warnings
from collections import namedtuple
from typing import Union
import torch
import torch.nn as nn
import torch.nn.functional as F
Expand Down Expand Up @@ -193,8 +194,7 @@ def _forward(self, x):
return x, aux2, aux1

@torch.jit.unused
def eager_outputs(self, x, aux2, aux1):
# type: (Tensor, Optional[Tensor], Optional[Tensor]) -> GoogLeNetOutputs
def eager_outputs(self, x: Tensor, aux2: Tensor, aux1: Optional[Tensor]) -> Union[GoogLeNetOutputs, Tensor]:
if self.training and self.aux_logits:
return _GoogLeNetOutputs(x, aux2, aux1)
else:
Expand Down
4 changes: 2 additions & 2 deletions torchvision/models/inception.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from collections import namedtuple
import warnings
from typing import Union
import torch
import torch.nn as nn
import torch.nn.functional as F
Expand Down Expand Up @@ -188,8 +189,7 @@ def _forward(self, x):
return x, aux

@torch.jit.unused
def eager_outputs(self, x, aux):
# type: (Tensor, Optional[Tensor]) -> InceptionOutputs
def eager_outputs(self, x: torch.Tensor, aux: Optional[Tensor]) -> Union[InceptionOutputs, torch.Tensor]:
if self.training and self.aux_logits:
return InceptionOutputs(x, aux)
else:
Expand Down

0 comments on commit 54b6c14

Please sign in to comment.