pytorch
c7b00058 - Enhance Tensor.unflatten to support -1 as the inferred size (#51955)

Commit
3 years ago
Enhance Tensor.unflatten to support -1 as the inferred size (#51955) Summary: Fixes https://github.com/pytorch/pytorch/issues/51719, https://github.com/pytorch/pytorch/issues/28142 **Change** - Update `torch.Tensor.unflatten` to support users pass`-1` as the inferred size for both tensors and named tensors. - Examples of using `-1` in the `unflatten` function are added to the docs. - Fix the rendered issue of original `unflatten` docs by removing a blank line between its example section. Pull Request resolved: https://github.com/pytorch/pytorch/pull/51955 Reviewed By: agolynski Differential Revision: D26467198 Pulled By: zou3519 fbshipit-source-id: 6a3ede25561223187273796427ad0cb63f125364
Parents
Loading