將兩個實數轉換為複數。
用法
tf.raw_ops.Complex(
real, imag, Tout=tf.dtypes.complex64, name=None
)參數
-
real一個Tensor。必須是以下類型之一:float32、float64。 -
imag一個Tensor。必須與real具有相同的類型。 -
Tout一個可選的tf.DType來自:tf.complex64, tf.complex128。默認為tf.complex64。 -
name操作的名稱(可選)。
返回
-
Tensor類型為Tout。
給定一個張量real表示複數的實部和張量imag表示複數的虛部,此操作返回形式為元素的複數,其中a代表real部分和b代表imag部分。
輸入張量 real 和 imag 必須具有相同的形狀。
例如:
# tensor 'real' is [2.25, 3.25]
# tensor `imag` is [4.75, 5.75]
tf.complex(real, imag) ==> [[2.25 + 4.75j], [3.25 + 5.75j]]
相關用法
- Python tf.raw_ops.ComplexAbs用法及代碼示例
- Python tf.raw_ops.Conv2D用法及代碼示例
- Python tf.raw_ops.Cos用法及代碼示例
- Python tf.raw_ops.Conj用法及代碼示例
- Python tf.raw_ops.Cosh用法及代碼示例
- Python tf.raw_ops.ConcatOffset用法及代碼示例
- Python tf.raw_ops.Case用法及代碼示例
- Python tf.raw_ops.CheckNumerics用法及代碼示例
- Python tf.raw_ops.Cumsum用法及代碼示例
- Python tf.raw_ops.Cumprod用法及代碼示例
- Python tf.raw_ops.CumulativeLogsumexp用法及代碼示例
- Python tf.raw_ops.TPUReplicatedInput用法及代碼示例
- Python tf.raw_ops.Bitcast用法及代碼示例
- Python tf.raw_ops.SelfAdjointEigV2用法及代碼示例
- Python tf.raw_ops.BatchMatMul用法及代碼示例
- Python tf.raw_ops.OneHot用法及代碼示例
- Python tf.raw_ops.ResourceScatterNdSub用法及代碼示例
- Python tf.raw_ops.ReadVariableXlaSplitND用法及代碼示例
- Python tf.raw_ops.GatherV2用法及代碼示例
- Python tf.raw_ops.SegmentMean用法及代碼示例
- Python tf.raw_ops.Expm1用法及代碼示例
- Python tf.raw_ops.UniqueWithCounts用法及代碼示例
- Python tf.raw_ops.DecodeGif用法及代碼示例
- Python tf.raw_ops.Size用法及代碼示例
- Python tf.raw_ops.ScatterUpdate用法及代碼示例
注:本文由純淨天空篩選整理自tensorflow.org大神的英文原創作品 tf.raw_ops.Complex。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。
