torch._foreach_cosh(self)
Paddle 无此 API,需要组合实现。
# PyTorch 写法 torch._foreach_cosh(tensors) # Paddle 写法 [paddle.cosh(x) for x in tensors]