1.6K Star 6K Fork 2.3K

GVPMindSpore / mindspore

 / 详情

model.train() 中的dataset在创建时采用int64, 但在执行过程中,送到模型中的数据类型为int16

DONE
Bug-Report
Opened this issue  
2021-10-20 15:16
name about labels
Bug Report Use this template for reporting a bug kind/bug

Environment

  • Hardware Environment(Ascend/GPU/CPU):

Uncomment only one /device <> line, hit enter to put that in a new line, and remove leading whitespaces from that line:

/device ascend
/device gpu
/device cpu

  • Software Environment:
    -- MindSpore version (source or binary):
    -- Python version (e.g., Python 3.7.5):
    -- OS platform and distribution (e.g., Linux Ubuntu 16.04):
    -- GCC/Compiler version (if compiled from source):

Related testcase

Steps to reproduce the issue

Describe the current behavior

Describe the expected behavior

Related log / screenshot

Special notes for this issue

Comments (6)

yinhong createdBug-Report
yinhong set related repository to MindSpore/mindspore
Expand operation logs

Please assign maintainer to check this issue.
请为这个issue分配处理人, @fangwenyi @chengxiaoli

Please add labels (comp or sig),also you can visit "https://gitee.com/mindspore/community/blob/master/sigs/dx/docs/labels.md" to find more.
为了让问题更快得到响应,请您为该issue打上 组件(comp)或兴趣组(sig) 标签,打上标签的问题可以直接推送给责任人进行处理。更多的标签可以查看
https://gitee.com/mindspore/community/blob/master/sigs/dx/docs/labels.md
以组件问题为例,如果你发现问题是data组件造成的,你可以这样评论:
//comp/data
当然你也可以向data SIG组求助,可以这样写:
//comp/data
//sig/data
如果是一个简单的问题,你可以留给刚进入社区的小伙伴来回答,这时候你可以这样写:
//good-first-issue
恭喜你,你已经学会了使用命令来打标签,接下来就在下面的评论里打上标签吧!

i-robot added
 
kind/bug
label

用户您好,建议补充下使用的脚本,谢谢~

chengxiaoli changed issue state from TODO to ACCEPTED
chengxiaoli set assignee to chengxiaoli
chengxiaoli set priority to Main
chengxiaoli added
 
mindspore-assistant
label

建议在你的脚本中,dataset对象在送入model.train接口前,添加如下代码,打印输出下,查看输出是否和你说的情况一致?

for item in define_data_set.create_dict_iterator(output_numpy=True):
    print(item)

如果上述输出就是int16,那你需要重新审视下你的数据预处理流程,这个int16就是预处理过程中生成的,你可以使用如下操作进行类型变换操作。

type_cast_op = C2.TypeCast(mstype.int64)
data_set = data_set.map(operations=type_cast_op, input_columns="label")

@yinhong 请按照guozhijian的建议修改后,再验证试试,如果没有问题的话,请将状态改为DONE,谢谢

fangwenyi changed issue state from ACCEPTED to WIP
fangwenyi changed issue state from WIP to VALIDATION
fangwenyi set milestone to B-SIG-Data

请按照guozhijian的建议修改,此ISSUE先关闭,如有需要请重新提单,或者自行修改ISSUE状态,谢谢

fangwenyi changed issue state from VALIDATION to DONE

Sign in to comment

Status
Assignees
Projects
Milestones
Pull Requests
Successfully merging a pull request will close this issue.
Branches
Planed to start   -   Planed to end
-
Top level
Priority
Duration (hours)
Confirm
参与者(5)
Python
1
https://git.oschina.net/mindspore/mindspore.git
git@git.oschina.net:mindspore/mindspore.git
mindspore
mindspore
mindspore

Search

182229 41614e54 1850385 182230 7885ed45 1850385