Attend the Women in ML Symposium on December 7 Register now

Stay organized with collections Save and categorize content based on your preferences.

Raises an exception if x is not compatible with the given rank.

For more details, see help(tf.TensorShape.assert_has_rank).

x object representing a shape; convertible to tf.TensorShape.
rank an int representing the minimum required rank of x.


ValueError If x does not represent a shape with the given rank.