tf.keras.ops.ndim

Return the number of dimensions of a tensor.

Main aliases

tf.keras.ops.numpy.ndim

x Input tensor.

The number of dimensions in x.