Skip to content

Commit

Permalink
Bug fixes of type annotation (facebookresearch#241)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhiqwang authored Sep 19, 2020
1 parent 5e66b4c commit 1d62eba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion util/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ def nested_tensor_from_tensor_list(tensor_list: List[Tensor]):
# _onnx_nested_tensor_from_tensor_list() is an implementation of
# nested_tensor_from_tensor_list() that is supported by ONNX tracing.
@torch.jit.unused
def _onnx_nested_tensor_from_tensor_list(tensor_list):
def _onnx_nested_tensor_from_tensor_list(tensor_list: List[Tensor]):
max_size = []
for i in range(tensor_list[0].dim()):
max_size_i = torch.max(torch.stack([img.shape[i] for img in tensor_list]).to(torch.float32)).to(torch.int64)
Expand Down

0 comments on commit 1d62eba

Please sign in to comment.