Paddle float 减tensor 计算结果不对

yks3o0rb  于 21天前  发布在  其他
关注(0)|答案(1)|浏览(18)

bug描述 Describe the Bug

float 减tensor 计算结果不对
import paddle
t = 1667603781.15
updata = paddle.to_tensor([1667603781.04999995], dtype='float64')
print(t-updata)
输出为
Tensor(shape=[1], dtype=float64, place=Place(gpu:0), stop_gradient=True,
[58.95000005])
实际应该为
Tensor(shape=[1], dtype=float64, place=Place(gpu:0), stop_gradient=True,
[0.10000014])

代码运行结果如下

其他补充信息 Additional Supplementary Information

No response

vc6uscn9

vc6uscn91#

我没有复现到这个错误,看下是不是paddle版本的问题呢?

相关问题