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.训练界面