name | about | labels |
---|---|---|
Bug Report | Use this template for reporting a bug | kind/bug |
Ascend
/GPU
/CPU
) / 硬件环境:/device CPU
Software Environment / 软件环境 (Mandatory / 必填):
-- MindSpore version (e.g., 1.7.0.Bxxx) : v2.2.13
-- Python version (e.g., Python 3.7.5) : 3.8.18
-- OS platform and distribution (e.g., Linux Ubuntu 16.04): Linux Ubuntu 18.04
-- GCC/Compiler version (if compiled from source): 7.5.0
Excute Mode / 执行模式 (Mandatory / 必填)(PyNative
/Graph
):
Please delete the mode not involved / 请删除不涉及的模式:
/mode pynative
When running the following code, mindspore.ops.linspace get a different result from pytorch
mindspore
import mindspore as mind
import numpy as np
output_tensor = mind.ops.linspace(start=0, end=float('inf'), steps=5)
# Print the output tensor
print("mindspore:", output_tensor)
#pytorch v2.0.0+cu117
import torch
import numpy as np
output_tensor = torch.linspace(start=0, end=float('inf'), steps=5)
# Print the output tensor
print("torch:", output_tensor)
tensor([nan, inf, nan, nan, nan])
Please assign maintainer to check this issue.
请为此issue分配处理人。
@fangwenyi @chengxiaoli @Shawny
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
感谢您的提问,您可以评论//mindspore-assistant更快获取帮助:
when float('nan') is the end parameter, the output is different too.
Relevant information visible at https://github.com/mindspore-ai/mindspore/issues/269
登录 后才可以发表评论