Returns an unknown TensorShape, optionally with a known rank. Args: ndims: (Optional) If specified, the number of dimensions in the shape. Returns: An unknown TensorShape.
(ndims=None)
| 988 | |
| 989 | |
| 990 | def unknown_shape(ndims=None): |
| 991 | """Returns an unknown TensorShape, optionally with a known rank. |
| 992 | |
| 993 | Args: |
| 994 | ndims: (Optional) If specified, the number of dimensions in the shape. |
| 995 | |
| 996 | Returns: |
| 997 | An unknown TensorShape. |
| 998 | """ |
| 999 | if ndims is None: |
| 1000 | return TensorShape(None) |
| 1001 | else: |
| 1002 | return TensorShape([Dimension(None)] * ndims) |
| 1003 | |
| 1004 | |
| 1005 | _SCALAR_SHAPE = TensorShape([]) |
no test coverage detected
searching dependent graphs…