按元素计算 x 的平方。
用法
tf.math.square(
x, name=None
)参数
-
x一个Tensor。必须是以下类型之一:bfloat16,half,float32,float64,int8,int16,int32,int64,uint8,uint16,uint32,uint64,complex64,complex128。 -
name操作的名称(可选)。
返回
-
A
Tensor.具有相同的类型x.如果
x是SparseTensor,则返回SparseTensor(x.indices, tf.math.square(x.values, ...), x.dense_shape)
即 。
tf.math.square([-2., 0., 3.])
<tf.Tensor: shape=(3,), dtype=float32, numpy=array([4., 0., 9.], dtype=float32)>
相关用法
- Python tf.math.sqrt用法及代码示例
- Python tf.math.special.fresnel_cos用法及代码示例
- Python tf.math.special.bessel_k0e用法及代码示例
- Python tf.math.segment_prod用法及代码示例
- Python tf.math.special.bessel_j0用法及代码示例
- Python tf.math.scalar_mul用法及代码示例
- Python tf.math.special.fresnel_sin用法及代码示例
- Python tf.math.segment_mean用法及代码示例
- Python tf.math.sigmoid用法及代码示例
- Python tf.math.special.bessel_j1用法及代码示例
- Python tf.math.sinh用法及代码示例
- Python tf.math.sign用法及代码示例
- Python tf.math.sin用法及代码示例
- Python tf.math.special.bessel_y0用法及代码示例
- Python tf.math.segment_max用法及代码示例
- Python tf.math.special.bessel_k1用法及代码示例
- Python tf.math.softplus用法及代码示例
- Python tf.math.special.bessel_k1e用法及代码示例
- Python tf.math.subtract用法及代码示例
- Python tf.math.special.bessel_k0用法及代码示例
- Python tf.math.special.spence用法及代码示例
- Python tf.math.special.dawsn用法及代码示例
- Python tf.math.segment_sum用法及代码示例
- Python tf.math.special.expint用法及代码示例
- Python tf.math.special.bessel_y1用法及代码示例
注:本文由纯净天空筛选整理自tensorflow.org大神的英文原创作品 tf.math.square。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。
