The statically known shape of this ragged tensor. Returns: A `TensorShape` containing the statically known shape of this ragged tensor. Ragged dimensions have a size of `None`. Examples: ```python >>> ragged.constant([[0], [1, 2]]).shape TensorShape([Dimensi
(self)
| 811 | |
| 812 | @property |
| 813 | def shape(self): |
| 814 | """The statically known shape of this ragged tensor. |
| 815 | |
| 816 | Returns: |
| 817 | A `TensorShape` containing the statically known shape of this ragged |
| 818 | tensor. Ragged dimensions have a size of `None`. |
| 819 | |
| 820 | Examples: |
| 821 | |
| 822 | ```python |
| 823 | >>> ragged.constant([[0], [1, 2]]).shape |
| 824 | TensorShape([Dimension(2), Dimension(None)]) |
| 825 | |
| 826 | >>> ragged.constant([[[0, 1]], [[1, 2], [3, 4]]], ragged_rank=1).shape |
| 827 | TensorShape([Dimension(2), Dimension(None), Dimension(2) |
| 828 | ``` |
| 829 | """ |
| 830 | nrows = tensor_shape.dimension_at_index(self._row_splits.shape, 0) - 1 |
| 831 | |
| 832 | values_shape = self._values.shape |
| 833 | value_shape = values_shape[1:] |
| 834 | return tensor_shape.TensorShape([nrows, None]).concatenate(value_shape) |
| 835 | |
| 836 | @property |
| 837 | def ragged_rank(self): |