tensorflow::ops::Cos
#include <math_ops.h>Tính cosin của x theo từng phần tử.
Bản tóm tắt
Hàm này, với một tensor đầu vào, tính cosin của mọi phần tử trong tensor đó. Phạm vi đầu vào là (-inf, inf) và phạm vi đầu ra là [-1,1] . Nếu đầu vào nằm ngoài phạm vi này, hàm sẽ trả về 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]
Luận điểm:
- phạm vi: Một đối tượng Phạm vi
Trả về:
-
Output: Tensor y.
Hàm khởi tạo và hàm hủy | |
|---|---|
Cos (const :: tensorflow::Scope & scope, :: tensorflow::Input x) |
Thuộc tính công khai | |
|---|---|
operation | |
y | |
Chức năng công cộng | |
|---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const | |
Thuộc tính công khai
hoạt động
Operation operation
y
::tensorflow::Output y
Chức năng công cộng
Cos
Cos( const ::tensorflow::Scope & scope, ::tensorflow::Input x )
nút
::tensorflow::Node * node() const
operator::tensorflow::Input
operator::tensorflow::Input() const
operator::tensorflow::Output
operator::tensorflow::Output() const