深入浅出Pytorch函数——torch.exp

分类目录:《深入浅出Pytorch函数》总目录
相关文章:
· 深入浅出TensorFlow2函数——tf.exp
· 深入浅出TensorFlow2函数——tf.math.exp
· 深入浅出Pytorch函数——torch.exp
· 深入浅出PaddlePaddle函数——paddle.exp


对输入input逐元素进行以自然数 e e e为底指数运算。

语法

torch.exp(input, *, out=None) → Tensor

参数

  • input:[Tensor] 输入的向量。
  • out :[可选,Tensor] 输出的向量。

返回值

x维度相同、数据类型相同的Tensor

实例

import paddle

>>> torch.exp(torch.tensor([0, math.log(2.)]))
tensor([ 1.,  2.])

猜你喜欢

转载自blog.csdn.net/hy592070616/article/details/129825929