# AttributeError: 'NestedTensor' object has no attribute 'shape'

**URL:** <https://discuss.pytorch.org/t/attributeerror-nestedtensor-object-has-no-attribute-shape/100601>\
**Category:** Uncategorized\
**Created:** [October 26, 2020, 2:22am UTC](https://discuss.pytorch.org/t/attributeerror-nestedtensor-object-has-no-attribute-shape/100601 "2020-10-26T02:22:16Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![ptrblck](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/ptrblck/32/1823_2.png) [@ptrblck](https://discuss.pytorch.org/u/ptrblck)\
**Post date:** [October 26, 2020, 8:03am UTC](https://discuss.pytorch.org/t/attributeerror-nestedtensor-object-has-no-attribute-shape/100601/2 "2020-10-26T08:03:59Z")

</div>

[NestedTensor](https://github.com/pytorch/nestedtensor) is a package to work with tensors of different sizes and lengths. It should be released soon, so I guess you might be using the nightly binary?

Anyway, I’m not sure if `.shape` should return this error or some `struct` containing different lengths.  
CC @cpuhrsch who is the main author of this package.

---

_[View the full topic](https://discuss.pytorch.org/t/attributeerror-nestedtensor-object-has-no-attribute-shape/100601)._
