【动手学深度学习v2】03 学习笔记
链接: 03 安装【动手学深度学习v2】
注意:环境是一个全新的Ubuntu系统
sudo apt update //更新软件仓库里的软件
sudo apt install build-essential //这个命令会安装包括编译器(如gcc),链接器和其他构建工具在内的一些必要的软件包,以便用户能够编译和构建其他软件。
安装miniconda
python --version //检查python版本
wget https://repo.anaconda.com/miniconda/Miniconda3-py310_23.9.0-0-Linux-x86_64.sh //安装miniconda,这里选择的是python 3.10的Linux版本
sh Miniconda3-py310_23.9.0-0-Linux-x86_64.sh
bash //进入conda环境,默认进入base环境
也可以自己创建一个新环境:
conda create -n study_deeplearning python=3.10 //也可以自己创建一个新环境
conda activate study_deeplearning
设置清华镜像为默认镜像源(升级 pip 到最新的版本 (>=10.0.0) 后进行配置:)
python -m pip install --upgrade pip
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
安装jupyter d2l torch torchversion(文件较大,需要稍等一段时间)
pip install jupyter d2l torch torchversion
下载本课程文档的juoyter版本并解压:
wget https://zh-v2.d2l.ai/d2l-zh.zip
sudo apt install zip
unzip d2l-zh.zip
ls
解压出来可以看到有三个版本(对应三个文件夹),分别是 tensorflow、 mxnet 、pytorch
这次视频里讲的是用的pytorch版本。
从github上下载PPT
git clone https://github.com/d2l-ai/d2l-zh-pytorch-slides
做本地映射
ssh -L8888:localhost:8888 username@192.168.1.108
在浏览器上打开网址:
http://127.0.0.1:8888/tree/d2l-zh-pytorch-slides/chapter_attention-mechanisms
在这里插入图片描述