tf.compat.v1.assert_integer

View source on GitHub

Assert that x is of integer dtype.

tf.compat.v1.assert_integer(
    x, message=None, name=None
)

Example of adding a dependency to an operation:

with tf.control_dependencies([tf.compat.v1.assert_integer(x)]):
  output = tf.reduce_sum(x)

Args:

Raises:

Returns:

A no_op that does nothing. Type can be determined statically.