返回复数(或实数)张量的虚部。
用法
tf.math.imag(
input, name=None
)参数
-
input一个Tensor。必须是以下类型之一:float,double,complex64,complex128。 -
name操作的名称(可选)。
返回
-
Tensor类型为float32或float64。
给定一个张量 input ,此操作返回一个类型为 float 的张量,它是 input 中每个元素的虚部,被视为复数。如果 input 为实数,则返回全零张量。
例如:
x = tf.constant([-2.25 + 4.75j, 3.25 + 5.75j])
tf.math.imag(x) # [4.75, 5.75]
相关用法
- Python tf.math.is_finite用法及代码示例
- Python tf.math.invert_permutation用法及代码示例
- Python tf.math.is_inf用法及代码示例
- Python tf.math.is_nan用法及代码示例
- Python tf.math.is_strictly_increasing用法及代码示例
- Python tf.math.is_non_decreasing用法及代码示例
- Python tf.math.special.fresnel_cos用法及代码示例
- Python tf.math.polyval用法及代码示例
- Python tf.math.special.bessel_k0e用法及代码示例
- Python tf.math.acosh用法及代码示例
- Python tf.math.segment_prod用法及代码示例
- Python tf.math.bincount用法及代码示例
- Python tf.math.bessel_i0e用法及代码示例
- Python tf.math.unsorted_segment_min用法及代码示例
- Python tf.math.conj用法及代码示例
- Python tf.math.scalar_mul用法及代码示例
- Python tf.math.zero_fraction用法及代码示例
- Python tf.math.reduce_max用法及代码示例
- Python tf.math.special.fresnel_sin用法及代码示例
- Python tf.math.segment_mean用法及代码示例
注:本文由纯净天空筛选整理自tensorflow.org大神的英文原创作品 tf.math.imag。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。
