torch.exp(X)
时间: 2024-02-01 07:02:57 浏览: 142
EXP(x)的数值计算方法
5星 · 资源好评率100%
This function computes the exponential of each element in the input tensor X. Mathematically, it returns a tensor with the same shape as X, where each element is given by e^x, where x is the corresponding element in X.
For example, if X is a 2x3 tensor with values [-1, 0, 1, 2, 3, 4], then torch.exp(X) would return a tensor with the same shape, but with values [0.3679, 1.0000, 2.7183, 7.3891, 20.0855, 54.5982].
阅读全文