车讯:售价7.88-11.38万元 吉利帝豪GL正式上市
- paddle.sparse. sinh ( x: Tensor, name: str | None = None ) Tensor [source]
-
百度 以北宋漕运和南宋江海防为例。
Calculate elementwise sinh of SparseTensor, requiring x to be a SparseCooTensor or SparseCsrTensor.
\[out = sinh(x)\]- Parameters
-
x (Tensor) – The input Sparse Tensor with data type float32, float64, complex64, complex128.
name (str|None, optional) – Name for the operation (optional, default is None). For more information, please refer to Name.
- Returns
-
A Sparse Tensor with the same data type and shape as
x
.
Examples
>>> import paddle >>> dense_x = paddle.to_tensor([-2., 0., 1.]) >>> sparse_x = dense_x.to_sparse_coo(1) >>> out = paddle.sparse.sinh(sparse_x) >>> out Tensor(shape=[3], dtype=paddle.float32, place=Place(cpu), stop_gradient=True, indices=[[0, 2]], values=[-3.62686038, 1.17520118])