256 Star 916 Fork 294

MindSpore / docs

错误调试优化

Empty-Template
REJECTED
firejohnny  Opened this issue

Traceback (most recent call last):
File "", line 1, in
File "D:\PyCharm\helpers\pydev_pydev_bundle\pydev_umd.py", line 197, in runfile
pydev_imports.execfile(filename, global_vars, local_vars) # execute the script
File "D:\PyCharm\helpers\pydev_pydev_imps_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "E:/TextCNN_2/train_model.py", line 87, in
model.train(cfg.num_epochs, train_set, callbacks=[time_cb, ckpoint_cb, loss_cb], dataset_sink_mode=False)
File "D:\miniconda\envs\MindSpore\lib\site-packages\mindspore\train\model.py", line 564, in train
sink_size=sink_size)
File "D:\miniconda\envs\MindSpore\lib\site-packages\mindspore\train\model.py", line 369, in _train
self._train_process(epoch, train_dataset, list_callback, cb_params)
File "D:\miniconda\envs\MindSpore\lib\site-packages\mindspore\train\model.py", line 490, in _train_process
outputs = self._train_network(*next_element)
File "D:\miniconda\envs\MindSpore\lib\site-packages\mindspore\nn\cell.py", line 227, in call
out = self.compile_and_run(*inputs)
File "D:\miniconda\envs\MindSpore\lib\site-packages\mindspore\nn\cell.py", line 449, in compile_and_run
_executor.compile(self, inputs, phase=self.phase, auto_parallel_mode=self._auto_parallel_mode)
File "D:\miniconda\envs\MindSpore\lib\site-packages\mindspore\common\api.py", line 425, in compile
result = self._executor.compile(obj, args_list, phase, use_vm)
File "D:\miniconda\envs\MindSpore\lib\site-packages\mindspore\ops\primitive.py", line 290, in infer
out[track] = fn(
(x[track] for x in args))
File "D:\miniconda\envs\MindSpore\lib\site-packages\mindspore\ops\operations\nn_ops.py", line 1077, in infer_shape
raise ValueError(f"For '{self.name}' The kernel size is not valid, "
ValueError: For 'MaxPool' The kernel size is not valid, please check it if is larger than data's shape size.

电脑所限,玩权不知道怎么去改,能不能像tensorflow一样支持错误调试 ,不是每个人都有linux环境的,请问这个shape错了,我都不知道改哪个

Attachments
5518576 mindspore ci 1587902139 total 3 participants

Comments (3)

5518576 mindspore ci 1587902139
mindspore-ci-bot 2020-09-13 23:32 member

Hey firejohnny, Welcome to MindSpore Community.
All of the projects in MindSpore Community are maintained by @mindspore-ci-bot .
That means the developers can comment below every pull request or issue to trigger Bot Commands.
Please follow instructions at https://gitee.com/mindspore/community/blob/master/command.md to find the details.

xiaotianci 2020-09-24 12:44

感谢您的宝贵建议,看错误提示应该是您的数据尺寸和模型设定不匹配,麻烦提供完整训练代码以便我们做进一步调试优化。

firejohnny 2020-09-25 20:43

我在内网的mindspore圈子里面已经发布代码了

Sign in to comment

Assignees
Labels
Not set
Projects
Milestones
Branches
Planed to start
Not set
Planed to end
Not set
Top level
Priority
1
https://gitee.com/mindspore/docs.git
git@gitee.com:mindspore/docs.git
mindspore
docs
docs

Search