《Dive into Deep Learning》笔记
环境配置
torch==1.12.0
torchvision==0.13.0
conda可以管理cuda,直接打包下载
conda install pytorch==1.12.0 torchvision==0.13.0 cudatoolkit=11.6 -c pytorch -c conda-forge
验证功能
python -c "import torch; print(f'PyTorch版本: {torch.__version__}'); print(f'CUDA是否可用: {torch.cuda.is_available()}'); print(f'显卡名称: {torch.cuda.get_device_name(0)}' if torch.cuda.is_available() else '未发现GPU')"
dive into deep learning 库
pip install d2l==0.17.6