建议使用以下浏览器,以获得最佳体验。 IE 9.0+以上版本 Chrome 31+ 谷歌浏览器 Firefox 30+ 火狐浏览器
请选择 进入手机版 | 继续访问电脑版
设置昵称

在此一键设置昵称,即可参与社区互动!

确定
我再想想
选择版块
直达楼层
标签
您还可以添加5个标签
  • 没有搜索到和“关键字”相关的标签
  • 云产品
  • 解决方案
  • 技术领域
  • 通用技术
  • 平台功能
取消

采纳成功

您已采纳当前回复为最佳回复

yd_269005398f

发帖: 7粉丝: 0

发消息 + 关注

发表于2021年03月21日 22:16:54 286 3
直达本楼层的链接
楼主
显示全部楼层
[执行问题] 1.1版本下的报错,在1.0版本并未报错,求解

【功能模块】



【操作步骤&问题现象】

前向过程中报错,然后一直输出

[WARNING] MD(121071,python):2021-03-21-22:06:10.264.793 [mindspore/ccsrc/minddata/dataset/util/task.cc:148] Join] GeneratorOp(ID:2) Thread ID 281472283959776 is not responding. Interrupt again

[WARNING] MD(121071,python):2021-03-21-22:06:11.265.062 [mindspore/ccsrc/minddata/dataset/util/task.cc:148] Join] GeneratorOp(ID:2) Thread ID 281472283959776 is not responding. Interrupt again

[WARNING] MD(121071,python):2021-03-21-22:06:12.265.344 [mindspore/ccsrc/minddata/dataset/util/task.cc:148] Join] GeneratorOp(ID:2) Thread ID 281472283959776 is not responding. Interrupt again

[WARNING] MD(121071,python):2021-03-21-22:06:13.265.507 [mindspore/ccsrc/minddata/dataset/util/task.cc:148] Join] GeneratorOp(ID:2) Thread ID 281472283959776 is not responding. Interrupt again


【截图信息】



【日志信息】(可选,上传日志内容或者附件)

[ERROR] PIPELINE(121071,python):2021-03-21-22:06:06.336.655 [mindspore/ccsrc/pipeline/jit/pipeline.cc:565] Compile]

The function call stack (See file 'analyze_fail.dat' for details):

# 0 In file /home/tuyanlun/archiconda3/envs/ms1.0/lib/python3.7/site-packages/mindspore/train/dataset_helper.py(87)

            return self.network(*outputs)

                   ^

# 1 In file /home/tuyanlun/code/mindspore_r1.0/hpa/src/network_define_pretrain.py(71)

        if self.reduce_flag:

# 2 In file /home/tuyanlun/code/mindspore_r1.0/hpa/src/network_define_pretrain.py(70)

        grads = self.grad(self.net_with_loss, weights)(data1, data2, data3, label)

                ^

# 3 In file /home/tuyanlun/code/mindspore_r1.0/hpa/src/network_define_pretrain.py(24)

    def construct(self, data1, data2, data3, label):

# 4 In file /home/tuyanlun/code/mindspore_r1.0/hpa/src/network_define_pretrain.py(26)

        feature1, feature2, feature3 = self._backbone(data)

                                       ^

# 5 In file /home/tuyanlun/code/mindspore_r1.0/hpa/src/resnet.py(317)

        if self.pretrain:

        ^

# 6 In file /home/tuyanlun/code/mindspore_r1.0/hpa/src/resnet.py(318)

            if self.use_MLP:

# 7 In file /home/tuyanlun/code/mindspore_r1.0/hpa/src/resnet.py(322)

                out = self.end_point(out)

                      ^

# 8 In file /home/tuyanlun/code/mindspore_r1.0/hpa/src/resnet.py(315)

        out = self.flatten(out)

              ^

# 9 In file /home/tuyanlun/code/mindspore_r1.0/hpa/src/resnet.py(314)

        out = self.mean(c5, (2, 3))

              ^

# 10 In file /home/tuyanlun/code/mindspore_r1.0/hpa/src/resnet.py(312)

        c5 = self.layer4(c4)

             ^

# 11 In file /home/tuyanlun/code/mindspore_r1.0/hpa/src/resnet.py(311)

        c4 = self.layer3(c3)

             ^

# 12 In file /home/tuyanlun/code/mindspore_r1.0/hpa/src/resnet.py(310)

        c3 = self.layer2(c2)

             ^

# 13 In file /home/tuyanlun/code/mindspore_r1.0/hpa/src/resnet.py(309)

        c2 = self.layer1(c1)

             ^

# 14 In file /home/tuyanlun/code/mindspore_r1.0/hpa/src/resnet.py(308)

        c1 = self.maxpool(x)

             ^

# 15 In file /home/tuyanlun/code/mindspore_r1.0/hpa/src/resnet.py(307)

        x = self.relu(x)

            ^

# 16 In file /home/tuyanlun/code/mindspore_r1.0/hpa/src/resnet.py(306)

        x = self.bn1(x)

            ^

# 17 In file /home/tuyanlun/code/mindspore_r1.0/hpa/src/resnet.py(305)

        x = self.conv1(x)

            ^

# 18 In file /home/tuyanlun/archiconda3/envs/ms1.0/lib/python3.7/site-packages/mindspore/nn/layer/conv.py(254)

        if self.has_bias:

# 19 In file /home/tuyanlun/archiconda3/envs/ms1.0/lib/python3.7/site-packages/mindspore/nn/layer/conv.py(253)

        output = self.conv2d(x, self.weight)

                 ^


Traceback (most recent call last):

  File "/home/tuyanlun/code/mindspore_r1.0/hpa/scripts/../pretrain.py", line 147, in <module>

    model.train(config.epochs, dataset, callbacks=cb, dataset_sink_mode=dataset_sink_mode)

  File "/home/tuyanlun/archiconda3/envs/ms1.0/lib/python3.7/site-packages/mindspore/train/model.py", line 592, in train

    sink_size=sink_size)

  File "/home/tuyanlun/archiconda3/envs/ms1.0/lib/python3.7/site-packages/mindspore/train/model.py", line 391, in _train

    self._train_dataset_sink_process(epoch, train_dataset, list_callback, cb_params, sink_size)

  File "/home/tuyanlun/archiconda3/envs/ms1.0/lib/python3.7/site-packages/mindspore/train/model.py", line 452, in _train_dataset_sink_process

    outputs = self._train_network(*inputs)

  File "/home/tuyanlun/archiconda3/envs/ms1.0/lib/python3.7/site-packages/mindspore/nn/cell.py", line 322, in __call__

    out = self.compile_and_run(*inputs)

  File "/home/tuyanlun/archiconda3/envs/ms1.0/lib/python3.7/site-packages/mindspore/nn/cell.py", line 578, in compile_and_run

    self.compile(*inputs)

  File "/home/tuyanlun/archiconda3/envs/ms1.0/lib/python3.7/site-packages/mindspore/nn/cell.py", line 565, in compile

    _executor.compile(self, *inputs, phase=self.phase, auto_parallel_mode=self._auto_parallel_mode)

  File "/home/tuyanlun/archiconda3/envs/ms1.0/lib/python3.7/site-packages/mindspore/common/api.py", line 505, in compile

    result = self._executor.compile(obj, args_list, phase, use_vm)

  File "/home/tuyanlun/archiconda3/envs/ms1.0/lib/python3.7/site-packages/mindspore/ops/primitive.py", line 401, in __infer__

    out[track] = fn(*(x[track] for x in args))

  File "/home/tuyanlun/archiconda3/envs/ms1.0/lib/python3.7/site-packages/mindspore/ops/operations/nn_ops.py", line 1211, in infer_shape

    validator.check_equal_int(len(x_shape_norm), 4, "x rank", self.name)

  File "/home/tuyanlun/archiconda3/envs/ms1.0/lib/python3.7/site-packages/mindspore/_checkparam.py", line 239, in check_equal_int

    return check_number(arg_value, value, Rel.EQ, int, arg_name, prim_name)

  File "/home/tuyanlun/archiconda3/envs/ms1.0/lib/python3.7/site-packages/mindspore/_checkparam.py", line 147, in check_number

    raise type_except(f'{arg_name} {prim_name} should be an {arg_type.__name__} and must {rel_str}, '

ValueError: `x rank` in `Conv2D` should be an int and must == 4, but got `5` with type `int`.


举报
分享

分享文章到朋友圈

分享文章到微博

采纳成功

您已采纳当前回复为最佳回复

chengxiaoli

发帖: 238粉丝: 31

级别 : 版主,版块专家

发消息 + 关注

发表于2021年03月22日 09:14:07
直达本楼层的链接
沙发
显示全部楼层

您好,欢迎使用MindSpore。

您的问题已经收到啦,正在联系专家分析原因,会尽快给您解答。

点赞 评论 引用 举报

采纳成功

您已采纳当前回复为最佳回复

梁成辉

发帖: 0粉丝: 1

发消息 + 关注

发表于2021年03月22日 11:45:09
直达本楼层的链接
板凳
显示全部楼层

"ValueError: `x rank` in `Conv2D` should be an int and must == 4, but got `5` with type `int`."

卷积不支持5维输入,这个报错是合理的。

评论
yd_269005398f 2021-3-22 12:40 评论

这是1.1的改动?

... 查看全部
点赞 评论 引用 举报

采纳成功

您已采纳当前回复为最佳回复

yd_269005398f

发帖: 7粉丝: 0

发消息 + 关注

发表于2021年03月22日 14:27:03
直达本楼层的链接
地板
显示全部楼层

已经解决,改变x的输入为4维

点赞 评论 引用 举报

游客

富文本
Markdown
您需要登录后才可以回帖 登录 | 立即注册

邀请回答
您可以邀请3位专家

结贴

您对问题的回复是否满意?
满意度
非常满意 满意 一般 不满意
我要反馈
0/200