Skip to content

torch.nn.MaxPool3d returns junk indices #1197

@alexander-beer-weiss

Description

@alexander-beer-weiss

MaxPool3d(return_indices=True) returns junk indices, both on CPU and GPU.

Here is an example:

pool3d = nn.MaxPool3d(kernel_size=2,stride=2,return_indices=True)
img3d = Variable(torch.rand(1,1,4,4,4))
out, indices = pool3d(img3d)
print(indices)

The output looks like this:

Variable containing:
(0 ,0 ,0 ,.,.) = 
  4.6117e+18  4.6117e+18
  4.2950e+09  2.3224e+18

(0 ,0 ,1 ,.,.) = 
  4.2950e+09  4.2950e+09
 -8.9845e+18  4.2950e+09
[torch.LongTensor of size 1x1x2x2x2]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions