Ubuntu之百度飞浆Paddle安装


aihuafeng66t
克里斯蒂亚诺诺 2024-01-03 16:21:12 50182 赞同 0 反对 0
分类: 资源
Ubuntu之百度飞浆Paddle安装

一、Paddle简介
  百度飞桨(PaddlePaddle)是百度基于深度学习技术研发的开源深度学习平台,提供全面的深度学习框架和工具,支持多种深度学习算法和模型,包括图像识别、自然语言处理、语音识别等领域。飞桨采用动态图和静态图相结合的方式,具有高效、灵活、易用的特点,帮助用户快速构建和训练深度学习模型,加速深度学习应用的落地。同时,百度飞桨还提供了丰富的深度学习应用场景案例和实践教程,帮助用户深入了解深度学习技术和应用。博文实验环境如下:

操作系统:Ubuntu20.04.3 LTS
cuda版本:11.6
python版本:3.8
Paddle版本:2.4
二、安装步骤
1、安装anconda3
  推荐使用pip或者conda方式安装,所以建议先创建一个python虚拟环境,可以先安装anconda3用于创建和管理python虚拟环境。安装步骤见博文Ubuntu之Anaconda3安装。

wuhs@jqxxpc:~$ wget https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/Anaconda3-2020.02-Linux-x86_64.sh
wuhs@jqxxpc:~$ sh Anaconda3-2020.02-Linux-x86_64.sh

2、创建paddle虚拟环境
(base) wuhs@jqxxpc:~$ conda create --name paddle python=3.8
(base) wuhs@jqxxpc:~$ conda activate paddle
(paddle) wuhs@jqxxpc:~$

3、官网选择安装方式获取安装命令
  访问飞浆官网,选择需要安装的飞浆版本,操作系统类型、安装方式、计算平台。博主这里是Ubuntu系统,配置有显卡选择的cuda11.6计算平台,查看cuda版本使用nvcc -V命令。关于cuda的安装可以参考博文Ubuntu之cuda安装及历史版本安装。
————————————————

4、执行安装命令
  点击复制按钮,复制安装命令,在paddle虚拟环境下直接执行此命令。

(paddle) wuhs@jqxxpc:~$ conda install paddlepaddle-gpu==2.4.2 cudatoolkit=11.6 -c https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/Paddle/ -c conda-forge

Proceed ([y]/n)? y

Preparing transaction: done
Verifying transaction: done
Executing transaction: | b’By downloading and using the CUDA Toolkit conda packages, you accept the terms and conditions of the CUDA End User License Agreement (EULA): https://docs.nvidia.com/cuda/eula/index.html\n’
| b’By downloading and using the cuDNN conda packages, you accept the terms and conditions of the NVIDIA cuDNN EULA -\n https://docs.nvidia.com/deeplearning/cudnn/sla/index.html\n’
done

5、安装验证
  安装完成后,输入python命令进入python交互模式,使用如下方式查看验证paddle是否安装成功,看到“PaddlePaddle is installed successfully! ”说明安装成功。使用paddle.__version__查看paddle版本。

(paddle) wuhs@jqxxpc:~$ python
>>> import paddle
>>> paddle.utils.run_check()
Running verify PaddlePaddle program …
PaddlePaddle works well on 1 GPU.
W0509 17:21:14.797003 3684118 fuse_all_reduce_op_pass.cc:79] Find all_reduce operators: 2. To make the speed faster, some all_reduce ops are fused during training, after fusion, the number of all_reduce ops is 2.
PaddlePaddle works well on 2 GPUs.
PaddlePaddle is installed successfully! Let’s start deep learning with PaddlePaddle now.
#使用paddle.__version__查看paddle版本。
>>> import paddle
>>> paddle.version
‘2.4.2’
————————————————

如果您发现该资源为电子书等存在侵权的资源或对该资源描述不正确等,可点击“私信”按钮向作者进行反馈;如作者无回复可进行平台仲裁,我们会在第一时间进行处理!

评价 0 条
克里斯蒂亚诺诺L1
粉丝 0 资源 831 + 关注 私信
最近热门资源
银河麒麟桌面操作系统备份用户数据  126
统信桌面专业版【全盘安装UOS系统】介绍  121
银河麒麟桌面操作系统安装佳能打印机驱动方法  114
银河麒麟桌面操作系统 V10-SP1用户密码修改  105
最近下载排行榜
银河麒麟桌面操作系统备份用户数据 0
统信桌面专业版【全盘安装UOS系统】介绍 0
银河麒麟桌面操作系统安装佳能打印机驱动方法 0
银河麒麟桌面操作系统 V10-SP1用户密码修改 0
作者收入月榜
1

prtyaa 收益393.62元

2

zlj141319 收益218元

3

1843880570 收益214.2元

4

IT-feng 收益209.03元

5

风晓 收益208.24元

6

777 收益172.71元

7

Fhawking 收益106.6元

8

信创来了 收益105.84元

9

克里斯蒂亚诺诺 收益91.08元

10

技术-小陈 收益79.5元

请使用微信扫码

加入交流群

请使用微信扫一扫!