Comments (12)
有没有什么简单的复现例子,我这边复现一下。看起来是你输入的tensor维度过多了。
from paddle.
https://github.com/PaddlePaddle/PaddleSeg/blob/release/2.9/contrib/RSSegBenchmark/c2fnet/README.md
我完全复现的PaddleSeg的案例,数据集和环境都是一致的。
我这个bug也有很多人遇到过,但是不知道从何处解决。
from paddle.
建议从代码里面深入看为什么会出现这个问题吧
from paddle.
你好,请提供更完整的报错信息,以帮助我们排查问题~
from paddle.
你好,请提供更完整的报错信息,以帮助我们排查问题~
你好,
这个就是完整的报错信息。
'''NotImplementedError: (Unimplemented) Invalid dimension to be accessed. Now only supports access to dimension 0 to 9, but received dimension is 10. (at C:\home\workspace\Paddle_release\paddle/phi/core/ddim.h:53)
[operator < split > error]'''
我严格按照官方配置和环境运行的,
https://github.com/PaddlePaddle/PaddleSeg/blob/release/2.9/contrib/RSSegBenchmark/c2fnet/README.md
from paddle.
这看起来只是错误信息的最后一段,请提供包括Python栈回溯信息在内的完整错误信息~
from paddle.
这看起来只是错误信息的最后一段,请提供包括Python栈回溯信息在内的完整错误信息~
Traceback (most recent call last):
File "train.py", line 269, in
main(args)
File "train.py", line 264, in main
to_static_training=cfg.to_static_training)
File "E:\PaddleSeg-develop\contrib\RSSegBenchmark\c2fnet\core\train.py", line 309, in train
**test_config)
File "E:\PaddleSeg-develop\contrib\RSSegBenchmark\c2fnet\core\val.py", line 169, in evaluate
crop_size=crop_size)
File "E:\PaddleSeg-develop\contrib\RSSegBenchmark\c2fnet\core\infer.py", line 190, in fined_inference
logits = model(im, heatmap)
File "D:\anaconda3\envs\segmentation\lib\site-packages\paddle\fluid\dygraph\layers.py", line 930, in call
return self._dygraph_call_func(*inputs, **kwargs)
File "D:\anaconda3\envs\segmentation\lib\site-packages\paddle\fluid\dygraph\layers.py", line 915, in _dygraph_call_func
outputs = self.forward(*inputs, **kwargs)
File "E:\PaddleSeg-develop\contrib\RSSegBenchmark\c2fnet\models\c2fnet.py", line 261, in forward
axis=1)
File "D:\anaconda3\envs\segmentation\lib\site-packages\paddle\tensor\manipulation.py", line 955, in split
input=x, num_or_sections=num_or_sections, dim=axis, name=name)
File "D:\anaconda3\envs\segmentation\lib\site-packages\paddle\fluid\layers\nn.py", line 5097, in split
_C_ops.split(input, out, *attrs)
NotImplementedError: (Unimplemented) Invalid dimension to be accessed. Now only supports access to dimension 0 to 9, but received dimension is 10. (at C:\home\workspace\Paddle_release\paddle/phi/core/ddim.h:53)
[operator < split > error]
你好,上述是全面的报错信息。
from paddle.
RSSegBenchmark通过测试的最新版本是PaddlePaddle 2.4+PaddleSeg 2.8,而从报错信息来看,实际使用的代码应该是PaddleSeg-develop,开发分支的代码尚未经过测试,因此可能存在bug。建议在装有PaddlePaddle 2.4+PaddleSeg 2.8的环境中再次尝试~
from paddle.
你好,我尝试了替换环境为paddlepaddle==2.4.0 PaddleSeg==2.8.0, 依然报告相同的错误,:
Traceback (most recent call last):
File "train.py", line 269, in
main(args)
File "train.py", line 264, in main
to_static_training=cfg.to_static_training)
File "E:\PaddleSeg-develop\contrib\RSSegBenchmark\c2fnet\core\train.py", line 309, in train
**test_config)
File "E:\PaddleSeg-develop\contrib\RSSegBenchmark\c2fnet\core\val.py", line 169, in evaluate
crop_size=crop_size)
File "E:\PaddleSeg-develop\contrib\RSSegBenchmark\c2fnet\core\infer.py", line 190, in fined_inference
logits = model(im, heatmap)
File "D:\anaconda3\envs\segmentation\lib\site-packages\paddle\fluid\dygraph\layers.py", line 948, in call
return self.forward(*inputs, **kwargs)
File "E:\PaddleSeg-develop\contrib\RSSegBenchmark\c2fnet\models\c2fnet.py", line 261, in forward
axis=1)
File "D:\anaconda3\envs\segmentation\lib\site-packages\paddle\tensor\manipulation.py", line 1982, in split
return _C_ops.split(input, num_or_sections, dim)
NotImplementedError: (Unimplemented) Invalid dimension to be accessed. Now only supports access to dimension 0 to 9, but received dimension is 10. (at C:\home\workspace\Paddle\paddle/phi/core/ddim.h:53)
from paddle.
看起来代码并没有被更换到PaddleSeg 2.8.0。
实际上,PaddleSeg 2.8.0的contrib\RSSegBenchmark\c2fnet\models\c2fnet.py
的第261行是这样的:
而PaddleSeg-develop的对应行是这样的:
使用PaddleSeg develop的代码才可能得到这样的错误信息:
File "E:\PaddleSeg-develop\contrib\RSSegBenchmark\c2fnet\models\c2fnet.py", line 261, in forward
axis=1)
因此,你使用的很可能还是PaddleSeg develop的代码。请更换PaddleSeg 2.8后尝试~
请注意,你应该从GitHub或Gitee等代码托管网站下载PaddleSeg 2.8的完整代码,使用其中的contrib\RSSegBenchmark
子项目,而不只是通过pip等工具安装paddleseg
库~
from paddle.
File "E:\Segmentation\PaddleSeg-release-2.8\contrib\RSSegBenchmark\c2fnet\core\train.py", line 309, in train
**test_config)
File "E:\Segmentation\PaddleSeg-release-2.8\contrib\RSSegBenchmark\c2fnet\core\val.py", line 169, in evaluate
crop_size=crop_size)
File "E:\Segmentation\PaddleSeg-release-2.8\contrib\RSSegBenchmark\c2fnet\core\infer.py", line 190, in fined_inference
logits = model(im, heatmap)
File "D:\anaconda3\envs\segmentation\lib\site-packages\paddle\fluid\dygraph\layers.py", line 948, in call
return self.forward(*inputs, **kwargs)
File "E:\Segmentation\PaddleSeg-release-2.8\contrib\RSSegBenchmark\c2fnet\models\c2fnet.py", line 270, in forward
axis=1)
File "D:\anaconda3\envs\segmentation\lib\site-packages\paddle\tensor\manipulation.py", line 1982, in split
return _C_ops.split(input, num_or_sections, dim)
NotImplementedError: (Unimplemented) Invalid dimension to be accessed. Now only supports access to dimension 0 to 9, but received dimension is 10. (at C:\home\workspace\Paddle\paddle/phi/core/ddim.h:53)
你好,我已经按照您的指示,重新下载了PaddleSeg 2.8,不是pip安装的。
测试报错如下,报错内容一样,只是错误信息所在的行数发生了变化
我想补充强调的是代码可以训练,但是在保存权重的时候 报错这个问题
from paddle.
我想补充强调的是代码可以训练,但是在保存权重的时候 报错这个问题
我读了一下代码,这个分支是推理阶段(self.training
为False)才执行的,所以这一现象是符合预期的。
关于这个错误,我实验发现有可能在num_or_sections
列表元素之和与输入tensor在指定axis
的尺寸不一致时触发,对于我们的情况而言,也就是说selected_fea_regions
的第1维尺寸可能不是16(结合上下文来看,也就是说,设置的类别数可能不是16)。建议在E:\Segmentation\PaddleSeg-release-2.8\contrib\RSSegBenchmark\c2fnet\models\c2fnet.py
的第267行执行print(selected_fea_regions.shape)
检查tensor的尺寸是否符合预期。
from paddle.
Related Issues (20)
- nn.Linear的输出与pytorch不一致 HOT 1
- windows下python3.10编译cuda12.1版本的2.6.1paddle失败 HOT 1
- while_loop报错 HOT 4
- LSTM API could_use_cudnn 段错误 HOT 5
- npu下import paddlenlp报错:No module named 'paddle.nn.layer.layers' HOT 2
- paddle.signal.stft 计算后,paddle.as_real 计算错误 HOT 2
- paddle.nn.MaxPool2D没有实现dilation参数 HOT 1
- docker镜像无法使用 HOT 1
- [WIP][Type Hints] 分批次进行类型标注 HOT 15
- 安装Paddle后import paddle报错 HOT 3
- MacOS 10.15安装paddle cpu版本后import paddle报错 HOT 2
- [NVIDIA] paddle.distributed.new_group的rank與world_size在group size=1時會輸出-1 HOT 1
- 官网映射文档develop版本无法正常显示,挂了很长时间了 HOT 1
- Inadequate Validation for 'chunks' Parameter in `paddle.chunk` led to Aborted. HOT 2
- Segmentation fault and Aborted in `paddle.index_fill_`. HOT 1
- 反馈部分API文档中的bug和docs仓库下的rst文档bug HOT 1
- develop 版本 padlde 安装后 Illegal instruction (core dumped) HOT 9
- paddle.jit.save failed!
- paddle 无法使用jit比jax训练慢 HOT 1
- http://paddlepaddle.org.cn/paddlehub页面不存在
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from paddle.