Summary:
According to mypy, the trailing -> None is mandatory.
Signed-off-by: Edward Z. Yang <ezyang@fb.com>
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15448
Differential Revision:
D13532179
Pulled By: ezyang
fbshipit-source-id:
e8972f8c9ada4657c518cd7bcd46e489ab8ddf5f
@weak_script_method
def check_forward_hidden(self, input, hx, hidden_label=''):
- # type: (Tensor, Tensor, str)
+ # type: (Tensor, Tensor, str) -> None
if input.size(0) != hx.size(0):
raise RuntimeError(
"Input batch size {} doesn't match hidden{} batch size {}".format(