PaddleDetection
PaddleDetection copied to clipboard
我训练pp-yolo的时候,报错,是怎么回事?
问题确认 Search before asking
- [X] 我已经搜索过问题,但是没有找到解答。I have searched the question and found no related answer.
请提出你的问题 Please ask your question
我按照https://aistudio.baidu.com/aistudio/projectdetail/5485593?forkThirdPart=1 这个链接一步一步执行,到训练的地方,总是报错:找不到模块,是怎么回事?谢谢
aistudio@jupyter-243022-5485593:~/PaddleDetection$ CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 python tools/train.py -c configs/ppyolo/ppyolo.yml --eval
/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/layers/utils.py:26: DeprecationWarning: np.int
is a deprecated alias for the builtin int
. To silence this warning, use int
by itself. Doing this will not modify any behavior and is safe. When replacing np.int
, you may wish to use e.g. np.int64
or np.int32
to specify the precision. If you wish to review your current use, check the release note link for additional information.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
def convert_to_list(value, n, name, dtype=np.int):
Traceback (most recent call last):
File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/ppdet/modeling/ops.py", line 21, in
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "tools/train.py", line 33, in
链接没公开看不到。这个报错是paddle版本和ppdet版本不匹配。PaddleDetection代码请切换到最新develop或2.6分支去使用。
https://aistudio.baidu.com/aistudio/projectdetail/5485593?forkThirdPart=1 这个链接,您访问不了吗?奇怪。如何把PaddleDetection代码切换到2.6分支啊?
PaddleDetection
https://aistudio.baidu.com/aistudio/projectdetail/5485314 我把项目公开了,这个链接您能访问吗?谢谢
这个项目和代码太老了。去官网安装最新的paddle吧,配合PaddleDetection最新develop或2.6分支,https://www.paddlepaddle.org.cn/install/quick?docurl=/documentation/docs/zh/install/pip/linux-pip.html
代码切换分支很基本的git命令网上查下,代码切换分支到最新develop或2.6分支:
git checkout develop
或者重新git clone一份 git clone https://github.com/PaddlePaddle/PaddleDetection.git -b develop
装paddlepaddle-gpu 2.4.2的时候,报错: ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. parl 1.4.1 requires pyzmq==18.1.1, but you have pyzmq 23.2.1 which is incompatible. 换装 paddlepaddle-gpu-2.2.0,安装的时候没有报错,可是运行 !python tools/train.py -c configs/ppyolo/ppyolov2_r50vd_dcn_365e_coco.yml --eval 的时候,报错: AttributeError: module 'paddle.nn.functional' has no attribute 'mish' 这个错误,在百度上搜索,也没有任何结果。怎么办? !python tools/train.py -h 这个命令,运行通过了。谢谢
具体的报错内容:
/home/aistudio/PaddleDetection
/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/tensor/creation.py:130: DeprecationWarning: np.object
is a deprecated alias for the builtin object
. To silence this warning, use object
by itself. Doing this will not modify any behavior and is safe.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
if data.dtype == np.object:
loading annotations into memory...
Done (t=0.00s)
creating index...
index created!
W0218 13:20:55.811735 8907 device_context.cc:447] Please NOTE: device: 0, GPU Compute Capability: 7.0, Driver API Version: 11.2, Runtime API Version: 10.2
W0218 13:20:55.816414 8907 device_context.cc:465] device: 0, cuDNN Version: 7.6.
[02/18 13:20:59] ppdet.utils.checkpoint INFO: Finish loading model weights: /home/aistudio/.cache/paddle/weights/ResNet50_vd_ssld_pretrained.pdparams
Traceback (most recent call last):
File "tools/train.py", line 177, in
!git clone https://gitee.com/paddlepaddle/PaddleDetection.git -b release/2.6 执行这个安装paddleDetection 2.6后(paddlepaddle-gpu-2.2.0),执行 !python tools/train.py -c configs/ppyolo/ppyolov2_r50vd_dcn_365e_coco.yml --eval 还是报错: AttributeError: module 'paddle.nn.functional' has no attribute 'mish'
import paddle paddle.fluid.install_check.run_check() Running Verify Fluid Program ... W0218 13:55:49.914819 12850 device_context.cc:447] Please NOTE: device: 0, GPU Compute Capability: 7.0, Driver API Version: 11.2, Runtime API Version: 10.2 W0218 13:55:49.919867 12850 device_context.cc:465] device: 0, cuDNN Version: 7.6. Your Paddle Fluid works well on SINGLE GPU or CPU. Your Paddle Fluid works well on MUTIPLE GPU or CPU. Your Paddle Fluid is installed successfully! Let's start deep Learning with Paddle Fluid now exit() aistudio@jupyter-243022-5485314:~/PaddleDetection/configs/ppyolo$ nvcc -V nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2019 NVIDIA Corporation Built on Sun_Jul_28_19:07:16_PDT_2019 Cuda compilation tools, release 10.1, V10.1.243 是这些版本不匹配吗?谢谢