MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / to_int32

Function to_int32

tensorflow/python/ops/math_ops.py:783–797  ·  view source on GitHub ↗

Casts a tensor to type `int32`. Args: x: A `Tensor` or `SparseTensor` or `IndexedSlices`. name: A name for the operation (optional). Returns: A `Tensor` or `SparseTensor` or `IndexedSlices` with same shape as `x` with type `int32`. Raises: TypeError: If `x` cannot be cas

(x, name="ToInt32")

Source from the content-addressed store, hash-verified

781@deprecation.deprecated(date=None, instructions="Use `tf.cast` instead.")
782@tf_export(v1=["to_int32"])
783def to_int32(x, name="ToInt32"):
784 """Casts a tensor to type `int32`.
785
786 Args:
787 x: A `Tensor` or `SparseTensor` or `IndexedSlices`.
788 name: A name for the operation (optional).
789
790 Returns:
791 A `Tensor` or `SparseTensor` or `IndexedSlices` with same shape as `x` with
792 type `int32`.
793
794 Raises:
795 TypeError: If `x` cannot be cast to the `int32`.
796 """
797 return cast(x, dtypes.int32, name=name)
798
799
800@deprecation.deprecated(date=None, instructions="Use `tf.cast` instead.")

Callers

nothing calls this directly

Calls 1

castFunction · 0.70

Tested by

no test coverage detected