Skip to content

Commit

Permalink
Fix mypy errors
Browse files Browse the repository at this point in the history
  • Loading branch information
sublee committed Aug 16, 2019
1 parent 310c2a6 commit 8e7b8bd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion stubs/torch/cuda/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ _device_t = Union[_device, int]
def check_error(res: int) -> None: ...
def device_count() -> int: ...
def empty_cache() -> None: ...
def synchronize(device: _device_t) -> None: ...
def synchronize(device: _device_t = ...) -> None: ...
def set_device(device: _device_t) -> None: ...
def get_device_capability(device: Optional[_device_t]=...) -> Tuple[int, int]: ...
def get_device_name(device: Optional[_device_t]=...) -> str: ...
Expand Down
4 changes: 4 additions & 0 deletions stubs/torch/nn/modules/module.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ class Module(Generic[T_co]):
def named_modules(self, memo: Optional[Set['Module']] = ..., prefix: str = ...) -> Iterator[
Tuple[str, 'Module']]: ...

#MODIFIED BY TORCHGPIPE
training: bool
#END

def train(self: T, mode: bool = ...) -> T: ...

def eval(self: T) -> T: ...
Expand Down

0 comments on commit 8e7b8bd

Please sign in to comment.