tf.assert_integer

tf.assert_integer

tf.assert_integer

assert_integer(
    x,
    message=None,
    name=None
)

Defined in tensorflow/python/ops/check_ops.py.

See the guide: Asserts and boolean checks

Assert that x is of integer dtype.

Example of adding a dependency to an operation:

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

Args:

  • x: Tensor whose basetype is integer and is not quantized.
  • message: A string to prefix to the default message.
  • name: A name for this operation (optional). Defaults to "assert_integer".

Raises:

  • TypeError: If x.dtype is anything other than non-quantized integer.

Returns:

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

© 2017 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/api_docs/python/tf/assert_integer

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部