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

Function to_complex128

tensorflow/python/ops/math_ops.py:859–873  ·  view source on GitHub ↗

Casts a tensor to type `complex128`. 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 `complex128`. Raises: TypeError: If `x` can

(x, name="ToComplex128")

Source from the content-addressed store, hash-verified

857@deprecation.deprecated(date=None, instructions="Use `tf.cast` instead.")
858@tf_export(v1=["to_complex128"])
859def to_complex128(x, name="ToComplex128"):
860 """Casts a tensor to type `complex128`.
861
862 Args:
863 x: A `Tensor` or `SparseTensor` or `IndexedSlices`.
864 name: A name for the operation (optional).
865
866 Returns:
867 A `Tensor` or `SparseTensor` or `IndexedSlices` with same shape as `x` with
868 type `complex128`.
869
870 Raises:
871 TypeError: If `x` cannot be cast to the `complex128`.
872 """
873 return cast(x, dtypes.complex128, name=name)
874
875
876ops.Tensor._override_operator("__neg__", gen_math_ops.neg)

Callers

nothing calls this directly

Calls 1

castFunction · 0.70

Tested by

no test coverage detected