pytorch
59fccab8 - [Shape Fns] Fix handling of empty dim list in sum_mean_dim shape fn (#83357)

Commit
3 years ago
[Shape Fns] Fix handling of empty dim list in sum_mean_dim shape fn (#83357) The current implementation of the `sum_mean_dim` shape function takes `dim=[]` and `dim=None` to mean "no reduction". However, in the ops `torch.sum` and `torch.mean`, both `dim=[]` and `dim=None` are equivalent to "reduce along all dimensions". This commit fixes the handling of `dim` in the `sum_mean_dim` shape function. Pull Request resolved: https://github.com/pytorch/pytorch/pull/83357 Approved by: https://github.com/Gamrix
Author
Committer
Parents
Loading