
具体日志见附件train.txt
代码部分:

****************************************************解答*****************************************************
看报错似乎不是因为贴出来这部分代码造成的。更像是模型的什么设置所导致。这个case(https://gitee.com/mindspore/mindspore/issues/I4MC4C?_from=gitee_search) 跟您的比较像。
这里试试排查一下(https://www.mindspore.cn/docs/zh-CN/r1.8/faq/data_processing.html):
