【PPDection】

文章讲述了在使用PaddleDetection时遇到关于paddleslim包的安装问题和Tensornumpy()警告,提供了修改ppdet/utils/stats.py代码的解决方法,以及训练模型的指令。
摘要由CSDN通过智能技术生成

PaddleDection源码出错

1.ppdet/engine/trainer.py指示下载paddleslim包→直接在搭好的PaddleDection环境里pip install paddleslim运行就不报错了
2.出现长警告

I0706 13:09:13.075042 3772 eager_method.cc:140] Warning:: 0D Tensor cannot be used as 'Tensor.numpy()[0]' . In order to avoid this problem, 0D Tensor will be changed to 1D numpy currently, but it's not correct and will be removed in release 2.6. For Tensor contain only one element, Please modify 'Tensor.numpy()[0]' to 'float(Tensor)' as soon as possible, otherwise 'Tensor.numpy()[0]' will raise error in release 2.6.
I0706 13:09:13.382442 3772 eager_method.cc:140] Warning:: 0D Tensor cannot be used as 'Tensor.numpy()[0]' . In order to avoid this problem, 0D Tensor will be changed to 1D numpy currently, but it's not correct and will be removed in release 2.6. For Tensor contain only one element, Please modify 'Tensor.numpy()[0]' to 'float(Tensor)' as soon as possible, otherwise 'Tensor.numpy()[0]' will raise error in release 2.6.

解决办法→经过排查将ppdet/utils/stats.py第77行进行如下修改
v.update(stats[k].numpy())v.update(float(stats[k]))
3.训练指令

python train.py --config=configs/keypoint/tiny_pose/tinypose_128×96.yml

4.训练界面
在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值