原始参考的官网网页:https://www.paddlepaddle.org.cn/documentation/docs/zh/1.5/beginners_guide/install/index_cn.html
使用命令行:
python -m pip install paddlepaddle-gpu==1.8.2.post97 -i https://pypi.tuna.tsinghua.edu.cn/simple
报错:
pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='pypi.tuna.tsinghua.edu.cn', port=443): Read timed out.
解决办法1:
https://www.jianshu.com/p/8e042b7e91b6中换成使用豆瓣源
结果:
未成功,报同样的错误
分析原因:这两个源pip下载包太久超时
解决办法2:
https://ai.baidu.com/forum/topic/show/954137中换成阿里云的源
命令行:
pip3 install paddlepaddle-gpu==1.8.3.post97 -i https://mirrors.aliyun.com/pypi/simple/
结果:成功
注明:一定要安装超过1.8.2及以上的版本,否则会报training 0: 11it [00:06, 2.71it/s]E1110 11:20:00.185431 12709 elementwise_op_function.h:1068] Error, broadcast should not into w broadcast
正向传播时没有问题,但却在反向传播中出现elementwise的广播问题导致无法对模型进行优化
使用conda虚拟环境安装之后,运行错误:
百度Paddlepaddle-GPU运行时出现Error: Cannot load cudnn shared library. Cannot invoke method cudnnGetVersion
查阅这篇:https://blog.csdn.net/qq451882471/article/details/106967942
没有解决,因为shared library中有没有libcudnn.so和libcublas.so
解决办法:
vi ~/.bashrc
输入
export LD_LIBRARY_PATH="xxx"
export CUDA_HOME=xxx
保存
source ~/.bashrc