zl程序教程

您现在的位置是:首页 >  工具

当前栏目

【动手学深度学习】基于pytorch的深度学习本地环境搭建

学习PyTorch 环境 基于 搭建 深度 本地 动手
2023-09-11 14:20:36 时间

本文将在一个全新干净的 ubuntu16.04 机器上进行pytorch学习,包括环境搭建的全过程。

一、环境搭建

1.1、Miniconda 安装

wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh

1.2、安装编译程序软件包(linux下需要)

sudo apt-get install build-essential

1.3、安装需要的包

注:更了更好的学习效果,一般是在jupyter中交互式运行学习。另外,为了直接能够在jupyter中打开markdown文件,建议安装jupytext,将markdown转换成ipynb文件。

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple -U jupyter d2l jupytext torch torchvision torchtext torchkeras 

1.4、下载代码并运行

下载《动手学深度学习v2》源码

wget https://zh-v2.d2l.ai/d2l-zh.zip
unzip d2l-zh.zip

运行jupyter

jupyter notebook

参考