torch.tanh
-
torch.tanh(input, *, out=None) → Tensor -
Возвращает новый тензор с гиперболическим тангенсом элементов
input.- Параметры
-
input (Tensor) – входной тензор.
- Ключевые аргументы
-
out (Tensor, необязательно) – выходной тензор.
Пример:
>>> a = torch.randn(4) >>> a tensor([ 0.8986, -0.7279, 1.1745, 0.2611]) >>> torch.tanh(a) tensor([ 0.7156, -0.6218, 0.8257, 0.2553])
© 2024, PyTorch Contributors
PyTorch has a BSD-style license, as found in the LICENSE file.
https://pytorch.org/docs/2.1/generated/torch.tanh.html