登录
注册
开源
企业版
高校版
搜索
帮助中心
使用条款
关于我们
开源
企业版
高校版
私有云
模力方舟
登录
注册
代码拉取完成,页面将自动刷新
开源项目
>
人工智能
>
自然语言处理
&&
捐赠
捐赠前请先登录
取消
前往登录
扫描微信二维码支付
取消
支付完成
支付提示
将跳转至支付宝完成支付
确定
取消
Watch
不关注
关注所有动态
仅关注版本发行动态
关注但不提醒动态
8
Star
38
Fork
19
MindSpore Lab
/
mindnlp
代码
Issues
14
Pull Requests
3
Wiki
统计
流水线
服务
JavaDoc
PHPDoc
质量分析
Jenkins for Gitee
腾讯云托管
腾讯云 Serverless
悬镜安全
阿里云 SAE
Codeblitz
SBOM
我知道了,不再自动展开
更新失败,请稍后重试!
移除标识
内容风险标识
本任务被
标识为内容中包含有代码安全 Bug 、隐私泄露等敏感信息,仓库外成员不可访问
0.3.1的mindnlp加载gpt2模型时候出现报错,输入输出dtype错误
待办的
#IAOTTY
liuhuijie2024
创建于
2024-09-04 16:41
通过 pip install mindlp安装的版本为 0.3.1,在通过mindnlp.transformers的GPT2ForSummarization加载模型时候出现报错,But current operator's input and output data types is: InputDesc [0] is Bool OutputDesc [0] is Bool 执行代码: ``` from mindspore import nn from mindnlp.transformers import GPT2Config, GPT2LMHeadModel config = GPT2Config(vocab_size=len(tokenizer)) model = GPT2ForSummarization(config) ``` 报错: ``` File ~/anaconda3/envs/MindSpore/lib/python3.9/site-packages/mindspore/common/tensor.py:214, in Tensor.__init__(self, input_data, dtype, shape, init, internal, const_arg) 211 input_data = _cast(input_data, dtype) 213 if is_stub_tensor(input_data): --> 214 input_data = input_data.stub_sync() 216 if internal: 217 if input_data is not None: File ~/anaconda3/envs/MindSpore/lib/python3.9/site-packages/mindspore/common/_stub_tensor.py:158, in StubTensor.stub_sync(self) 156 """sync real tensor.""" 157 if self.stub: --> 158 val = self.stub.get_value() 159 self.tensor = Tensor(val, internal=True) 160 if hasattr(self, "member_cache"): TypeError: The supported input and output data types for the current operator are: node is Default/Tril-op0 InputDesc [0] support {complex128,complex64,double,float,float16,int16,int32,int64,int8,qint16,qint32,qint8,quint16,quint8,uint16,uint32,uint64,uint8,bf16,} OutputDesc [0] support {complex128,complex64,double,float,float16,int16,int32,int64,int8,qint16,qint32,qint8,quint16,quint8,uint16,uint32,uint64,uint8,bf16,} But current operator's input and output data types is: InputDesc [0] is Bool OutputDesc [0] is Bool ---------------------------------------------------- - C++ Call Stack: (For framework developers) ---------------------------------------------------- mindspore/ccsrc/plugin/device/ascend/hal/device/kernel_select_ascend.cc:537 HandleKernelSelectFailure ``` 
通过 pip install mindlp安装的版本为 0.3.1,在通过mindnlp.transformers的GPT2ForSummarization加载模型时候出现报错,But current operator's input and output data types is: InputDesc [0] is Bool OutputDesc [0] is Bool 执行代码: ``` from mindspore import nn from mindnlp.transformers import GPT2Config, GPT2LMHeadModel config = GPT2Config(vocab_size=len(tokenizer)) model = GPT2ForSummarization(config) ``` 报错: ``` File ~/anaconda3/envs/MindSpore/lib/python3.9/site-packages/mindspore/common/tensor.py:214, in Tensor.__init__(self, input_data, dtype, shape, init, internal, const_arg) 211 input_data = _cast(input_data, dtype) 213 if is_stub_tensor(input_data): --> 214 input_data = input_data.stub_sync() 216 if internal: 217 if input_data is not None: File ~/anaconda3/envs/MindSpore/lib/python3.9/site-packages/mindspore/common/_stub_tensor.py:158, in StubTensor.stub_sync(self) 156 """sync real tensor.""" 157 if self.stub: --> 158 val = self.stub.get_value() 159 self.tensor = Tensor(val, internal=True) 160 if hasattr(self, "member_cache"): TypeError: The supported input and output data types for the current operator are: node is Default/Tril-op0 InputDesc [0] support {complex128,complex64,double,float,float16,int16,int32,int64,int8,qint16,qint32,qint8,quint16,quint8,uint16,uint32,uint64,uint8,bf16,} OutputDesc [0] support {complex128,complex64,double,float,float16,int16,int32,int64,int8,qint16,qint32,qint8,quint16,quint8,uint16,uint32,uint64,uint8,bf16,} But current operator's input and output data types is: InputDesc [0] is Bool OutputDesc [0] is Bool ---------------------------------------------------- - C++ Call Stack: (For framework developers) ---------------------------------------------------- mindspore/ccsrc/plugin/device/ascend/hal/device/kernel_select_ascend.cc:537 HandleKernelSelectFailure ``` 
评论 (
0
)
登录
后才可以发表评论
状态
待办的
待办的
进行中
已完成
已关闭
负责人
未设置
标签
未设置
标签管理
里程碑
未关联里程碑
未关联里程碑
Pull Requests
未关联
未关联
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
未关联
分支 (4)
标签 (12)
master
0.4
janus
revert-1830-master
v0.5.0rc1
v0.4.1
v0.4.0
v0.3.1
v0.3.0
v0.2.4
v0.2.3
v0.2.2
v0.2.1
v0.2.0
v0.1.1
v0.0.1-alpha
开始日期   -   截止日期
-
置顶选项
不置顶
置顶等级:高
置顶等级:中
置顶等级:低
优先级
不指定
严重
主要
次要
不重要
参与者(1)
1
https://gitee.com/mindspore-lab/mindnlp.git
git@gitee.com:mindspore-lab/mindnlp.git
mindspore-lab
mindnlp
mindnlp
点此查找更多帮助
搜索帮助
Git 命令在线学习
如何在 Gitee 导入 GitHub 仓库
Git 仓库基础操作
企业版和社区版功能对比
SSH 公钥设置
如何处理代码冲突
仓库体积过大,如何减小?
如何找回被删除的仓库数据
Gitee 产品配额说明
GitHub仓库快速导入Gitee及同步更新
什么是 Release(发行版)
将 PHP 项目自动发布到 packagist.org
评论
仓库举报
回到顶部
登录提示
该操作需登录 Gitee 帐号,请先登录后再操作。
立即登录
没有帐号,去注册