Skip to content

picodet,训练报错 #9367

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
3 tasks done
tjpulfn opened this issue Apr 30, 2025 · 1 comment
Open
3 tasks done

picodet,训练报错 #9367

tjpulfn opened this issue Apr 30, 2025 · 1 comment
Assignees

Comments

@tjpulfn
Copy link

tjpulfn commented Apr 30, 2025

问题确认 Search before asking

  • 我已经查询历史issue,没有发现相似的bug。I have searched the issues and found no similar bug report.

Bug组件 Bug Component

No response

Bug描述 Describe the Bug

使用docker安装paddle3.0.0,cuda11.8,准备好数据
paddle使用release-2.6版本
运行toos/train.py 会报错
/PaddleDetection-release-2.6$ CUDA_VISIBLE_DEVICES=0 python tools/train.py -c configs/picodet/picodet_s_416_coco_lcnet_OB.yml
/usr/local/lib/python3.10/dist-packages/setuptools-68.2.2-py3.10.egg/setuptools/sandbox.py:13: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
import pkg_resources
/usr/local/lib/python3.10/dist-packages/setuptools-68.2.2-py3.10.egg/pkg_resources/init.py:2871: DeprecationWarning: Deprecated call to pkg_resources.declare_namespace('google').
Implementing implicit namespace packages (as specified in PEP 420) is preferred to pkg_resources.declare_namespace. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
declare_namespace(pkg)
/usr/local/lib/python3.10/dist-packages/setuptools-68.2.2-py3.10.egg/pkg_resources/init.py:2871: DeprecationWarning: Deprecated call to pkg_resources.declare_namespace('zope').
Implementing implicit namespace packages (as specified in PEP 420) is preferred to pkg_resources.declare_namespace. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
declare_namespace(pkg)
loading annotations into memory...
Done (t=0.03s)
creating index...
index created!
[04/30 07:22:27] ppdet.data.source.coco INFO: Load [2190 samples valid, 12 samples invalid] in file /home/fengnan.liu/datasets/SOD/cocome/annotations/instance_train.json.
W0430 07:22:27.103533 1441 gpu_context.cc:278] Please NOTE: device: 0, GPU Compute Capability: 8.6, Driver API Version: 12.4, Runtime API Version: 10.2
W0430 07:22:27.105247 1441 gpu_context.cc:306] device: 0, cuDNN Version: 8.9.
Traceback (most recent call last):
File "/home/fengnan.liu/code/PaddleDetection-release-2.6/tools/train.py", line 202, in
main()
File "/home/fengnan.liu/code/PaddleDetection-release-2.6/tools/train.py", line 198, in main
run(FLAGS, cfg)
File "/home/fengnan.liu/code/PaddleDetection-release-2.6/tools/train.py", line 142, in run
trainer = Trainer(cfg, mode='train')
File "/home/fengnan.liu/code/PaddleDetection-release-2.6/ppdet/engine/trainer.py", line 113, in init
self.model = create(cfg.architecture)
File "/home/fengnan.liu/code/PaddleDetection-release-2.6/ppdet/core/workspace.py", line 255, in create
cls_kwargs.update(cls.from_config(config, **kwargs))
File "/home/fengnan.liu/code/PaddleDetection-release-2.6/ppdet/modeling/architectures/picodet.py", line 55, in from_config
head = create(cfg['head'], **kwargs)
File "/home/fengnan.liu/code/PaddleDetection-release-2.6/ppdet/core/workspace.py", line 292, in create
return cls(**cls_kwargs)
File "/home/fengnan.liu/code/PaddleDetection-release-2.6/ppdet/modeling/heads/pico_head.py", line 459, in init
super(PicoHeadV2, self).init(
File "/home/fengnan.liu/code/PaddleDetection-release-2.6/ppdet/modeling/heads/gfl_head.py", line 237, in init
self.distribution_project = Integral(self.reg_max)
File "/home/fengnan.liu/code/PaddleDetection-release-2.6/ppdet/modeling/heads/gfl_head.py", line 69, in init
paddle.linspace(0, self.reg_max, self.reg_max + 1))
File "/home/fengnan.liu/.local/lib/python3.10/site-packages/paddle/fluid/layers/tensor.py", line 1573, in linspace
return _C_ops.linspace(tensor_start, tensor_stop, tensor_num, 'dtype',
ValueError: (InvalidArgument) The num of linspace op should be larger than 0, but received num is 0
[Hint: Expected num > 0, but received num:0 <= 0:0.] (at /paddle/paddle/phi/kernels/gpu/linspace_kernel.cu:70)
[operator < linspace > error]

复现环境 Environment

linux
release-2.6
cuDNN Version: 8.9.
python3.10
cuda11.8
paddlepaddle-gpu 2.3.0

Bug描述确认 Bug description confirmation

  • 我确认已经提供了Bug复现步骤、代码改动说明、以及环境信息,确认问题是可以复现的。I confirm that the bug replication steps, code change instructions, and environment information have been provided, and the problem can be reproduced.

是否愿意提交PR? Are you willing to submit a PR?

  • 我愿意提交PR!I'd like to help by submitting a PR!
@tjpulfn
Copy link
Author

tjpulfn commented Apr 30, 2025

PaddleDetection-release-2.8.1版本会报错
/usr/local/lib/python3.10/dist-packages/setuptools-68.2.2-py3.10.egg/setuptools/sandbox.py:13: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
import pkg_resources
/usr/local/lib/python3.10/dist-packages/setuptools-68.2.2-py3.10.egg/pkg_resources/init.py:2871: DeprecationWarning: Deprecated call to pkg_resources.declare_namespace('google').
Implementing implicit namespace packages (as specified in PEP 420) is preferred to pkg_resources.declare_namespace. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
declare_namespace(pkg)
/usr/local/lib/python3.10/dist-packages/setuptools-68.2.2-py3.10.egg/pkg_resources/init.py:2871: DeprecationWarning: Deprecated call to pkg_resources.declare_namespace('zope').
Implementing implicit namespace packages (as specified in PEP 420) is preferred to pkg_resources.declare_namespace. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
declare_namespace(pkg)
Traceback (most recent call last):
File "/home/fengnan.liu/code/PaddleDetection-release-2.8.1/tools/train.py", line 35, in
from ppdet.core.workspace import load_config, merge_config
File "/home/fengnan.liu/code/PaddleDetection-release-2.8.1/ppdet/init.py", line 15, in
from . import (core, data, engine, modeling, model_zoo, optimizer, metrics,
File "/home/fengnan.liu/code/PaddleDetection-release-2.8.1/ppdet/data/init.py", line 16, in
from . import transform
File "/home/fengnan.liu/code/PaddleDetection-release-2.8.1/ppdet/data/transform/init.py", line 15, in
from . import operators
File "/home/fengnan.liu/code/PaddleDetection-release-2.8.1/ppdet/data/transform/operators.py", line 57, in
from ppdet.modeling.keypoint_utils import get_affine_transform, affine_transform
File "/home/fengnan.liu/code/PaddleDetection-release-2.8.1/ppdet/modeling/init.py", line 23, in
from . import heads
File "/home/fengnan.liu/code/PaddleDetection-release-2.8.1/ppdet/modeling/heads/init.py", line 17, in
from . import yolo_head
File "/home/fengnan.liu/code/PaddleDetection-release-2.8.1/ppdet/modeling/heads/yolo_head.py", line 26, in
from ..losses import IouLoss
File "/home/fengnan.liu/code/PaddleDetection-release-2.8.1/ppdet/modeling/losses/init.py", line 34, in
from . import clrnet_loss
File "/home/fengnan.liu/code/PaddleDetection-release-2.8.1/ppdet/modeling/losses/clrnet_loss.py", line 6, in
from ppdet.modeling.assigners.clrnet_assigner import assign
File "/home/fengnan.liu/code/PaddleDetection-release-2.8.1/ppdet/modeling/assigners/init.py", line 18, in
from . import simota_assigner
File "/home/fengnan.liu/code/PaddleDetection-release-2.8.1/ppdet/modeling/assigners/simota_assigner.py", line 22, in
from ppdet.modeling.losses.varifocal_loss import varifocal_loss
File "/home/fengnan.liu/code/PaddleDetection-release-2.8.1/ppdet/modeling/losses/varifocal_loss.py", line 27, in
from paddle.base.framework import in_dygraph_mode
ModuleNotFoundError: No module named 'paddle.base'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants