|View source on GitHub|
Asserts that the given
tensor is a scalar (i.e. zero-dimensional).
`tf.assert_scalar`, `tf.contrib.framework.assert_scalar`Compat aliases for migration
See Migration guide for more details.
tf.debugging.assert_scalar( tensor, name=None, message=None )
This function raises
ValueError unless it can be certain that the given
tensor is a scalar.
ValueError is also raised if the shape of
tensor is unknown.
| || A |
| ||A name for this operation. Defaults to "assert_scalar"|
| ||A string to prefix to the default message.|
| The input tensor (potentially converted to a |
| ||If the tensor is not scalar (rank 0), or if its shape is unknown.|
© 2020 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.