按元素計算 x 的 cos。
用法
tf.raw_ops.Cos(
x, name=None
)
參數
-
x
一個Tensor
。必須是以下類型之一:bfloat16
,half
,float32
,float64
,complex64
,complex128
。 -
name
操作的名稱(可選)。
返回
-
一個
Tensor
。具有與x
相同的類型。
給定輸入張量,此函數計算張量中每個元素的餘弦。輸入範圍為 (-inf, inf)
,輸出範圍為 [-1,1]
。如果輸入位於邊界之外,則返回nan
。
x = tf.constant([-float("inf"), -9, -0.5, 1, 1.2, 200, 10000, float("inf")])
tf.math.cos(x) ==> [nan -0.91113025 0.87758255 0.5403023 0.36235774 0.48718765 -0.95215535 nan]
相關用法
- Python tf.raw_ops.Cosh用法及代碼示例
- Python tf.raw_ops.ComplexAbs用法及代碼示例
- Python tf.raw_ops.Conv2D用法及代碼示例
- Python tf.raw_ops.Conj用法及代碼示例
- Python tf.raw_ops.Complex用法及代碼示例
- 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.Expm1用法及代碼示例
注:本文由純淨天空篩選整理自tensorflow.org大神的英文原創作品 tf.raw_ops.Cos。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。