This repository was archived by the owner on Nov 15, 2022. It is now read-only.
- Notifications
You must be signed in to change notification settings - Fork 26
This repository was archived by the owner on Nov 15, 2022. It is now read-only.
nt.shape doesn't work #471
Copy link
Copy link
Open
Description
🐛 Bug
shape, size, dim, nested_size, nested_dim, tensor_dim, etc don't work.
To Reproduce
Steps to reproduce the behaviour:
initialise nestedtensor nt and call nt.shape
>>> import torch >>> x = torch.nested_tensor([torch.rand(2), torch.rand(3)]) <stdin>:1: UserWarning: The PyTorch API of nested tensors is in prototype stage and will change in the near future. (Triggered internally at /Users/runner/work/pytorch/pytorch/pytorch/aten/src/ATen/NestedTensorImpl.cpp:99.) >>> x.shape Traceback (most recent call last): File "<stdin>", line 1, in <module> RuntimeError: Internal error: NestedTensorImpl doesn't support sizes. Please file an issue on https://github.com/pytorch/nestedtensor Expected behavior
Expected the same behaviour as seen in the example colab https://colab.research.google.com/github/pytorch/nestedtensor/blob/master/tutorials/notebooks/basic.ipynb#scrollTo=STGxLWXXVg5Z
Environment
Tested with torch 1.13.0.dev20220713 on both python3.8 and python3.9
marwanghalib
Metadata
Metadata
Assignees
Labels
No labels