Skip to content

the default of torch.max keepdim is False, which is inconsistent with the document #1845

@xwgeng

Description

@xwgeng

According to the doc torch.max, the default of keepdim is True, but actually setted to False . Maybe the issue occurs due to this line


In [2]: x = torch.ones(1,2)

In [3]: x
Out[3]: 

 1  1
[torch.FloatTensor of size 1x2]

In [4]: x.max(1)
Out[4]: 
(
  1
 [torch.FloatTensor of size 1], 
  0
 [torch.LongTensor of size 1])

In [5]: x.min(1)
Out[5]: 
(
  1
 [torch.FloatTensor of size 1], 
  0
 [torch.LongTensor of size 1])

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