Paddle 使用踩坑

Could not load library cudnn_cnn_infer64_8.dll. Error code 193

原因:安装 16.1 CUDA 有区别需要到github再下载依赖才能适配使用 cuDNN
参考:https://www.pudn.com/news/62d7bc0d864d5c73acd326a0.html

验证:paddle 以及环境时候安装完成

import paddle
paddle.utils.run_check()

paddle.utils.run_check()已经success了但是执行脚本还是报 Could not load library cudnn_cnn_infer64_8.dll. Error code 193

是zlibwapi.dll 有问题,这paddle 把提示吞了
参考https://forums.developer.nvidia.com/t/could-not-load-library-cudnn-cnn-infer64-8-dll-error-code-193/218437/16

内存不够

Out of memory error on GPU 0. Cannot allocate 70.312500MB memory on GPU 0, 1.999817GB memory has been allocated and available memory is only 0.000000B.

Please check whether there is any other process using GPU 0.

  1. If yes, please stop them, or start PaddlePaddle on another GPU.
  2. If no, please decrease the batch size of your model.

加了参数改了batch_size

Train.loader.batch_size_per_card=1

swig 安装,放到path下了还是不行

参考 : https://blog.csdn.net/weixin_44566432/article/details/108912972
再安装量化工具的时候发现需要swig,安装了且设置了path但没用。

 pip install paddleslim==2.3.2

改用 conda安装

conda install swig

error: Microsoft Visual C++ 14.0 or greater is required. Get it with “Microsoft C++ Build Tools”: https://visualstudio.microsoft.com/visual-cpp-build-tools/

通过安装 Visual studio 来安装,需要选C++的桌面应用(没有的话先选C++的游戏,就有了)。


版权声明:本文为qq_32377725原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。