-
Notifications
You must be signed in to change notification settings - Fork 26.3k
Closed
Labels
module: nnRelated to torch.nnRelated to torch.nntriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module
Description
The output of Maxpool has an unexpected size for some corner cases.
Repro:
Maxpool1d(kernel_size=3, stride=2, padding=0, dilation=2)
input=torch.randn(1,1,4)
If I use the L_out formula from the documentation (https://pytorch.org/docs/stable/nn.html?highlight=maxpool#torch.nn.MaxPool1d) to compute the output size, I get {1,1,0}.
However, the output generated has a size of {1, 1, 1}.
And with ONNX, the same operation results in an output of shape {1,1,0}
(microsoft/onnxruntime#1224).
Since this case is not mentioned in the documentation, I was wondering if this is a special case that is handled separately by design (to avoid returning an output with a dim of 0), or if it is a bug.
Metadata
Metadata
Assignees
Labels
module: nnRelated to torch.nnRelated to torch.nntriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module