深度学习环境配置

python插件镜像网站​​​​​​

阿里云镜像:https://mirrors.aliyun.com/pypi/simple/

中国科技大学:https://pypi.mirrors.ustc.edu.cn/simple/

豆瓣(douban) :http://pypi.douban.com/simple/

清华大学 :https://pypi.tuna.tsinghua.edu.cn/simple/

中国科学技术大学 :http://pypi.mirrors.ustc.edu.cn/simple/

安装命令后添加(pip命令)

-i https://pypi.tuna.tsinghua.edu.cn/simple some-package

CUDA

查看版本

NVIDIA控制面板—->帮助—->系统信息—->组件—->NVCUDA.DLL

下载CUDA

CUDA GPUs | NVIDIA Developer

Pytorch安装

官方网站历史版本下载(配合国内镜像下载):Previous PyTorch Versions | PyTorch

验证GPU

import torch
torch.cuda.is_available()

TensorFlow安装

版本问题

Windows:https://www.tensorflow.org/install/source_windows

Linux/macOS:https://www.tensorflow.org/install/source#common_installation_problems

深度学习环境配置

下载

python2

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple/ --upgrade tensorflow      # CPU版本
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple/ --upgrade tensorflow-gpu  # GPU版本

python3

pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple/ --upgrade tensorflow     # CPU版本
pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple/ --upgrade tensorflow-gpu #  GPU版本

核实

import tensorflow as tf
tf.test.is_gpu_available()

问题

版本问题

[TensorFlow] 运行报错:W tensorflow/stream_executor/platform/default/dso_loader.cc:59]
Could not load dynamic library 'cudart64_110.dll'; dlerror: cudart64_110.dll not found

  1. 下载链接:cudart64_110.dll free download | DLL‑files.com
  2. 将cudart64_110.dll放在文件夹下C:\Windows\System32

其他dll文件:Search result for | DLL‑files.com

TensorBoardX(适用于pytorch)

必须先安装tensorflow!!!

github:https://github.com/lanpa/tensorboardX/

pip install tensorboardX

or build from source:

pip install 'git+https://github.com/lanpa/tensorboardX'

You can optionally install crc32c to speed up.

pip install crc32c

Starting from tensorboardX 2.1, You need to install soundfile for the add_audio() function (200x speedup).

pip install soundfile

文章出处登录后可见!

已经登录?立即刷新

共计人评分,平均

到目前为止还没有投票!成为第一位评论此文章。

(0)
乘风的头像乘风管理团队
上一篇 2022年3月23日 下午10:32
下一篇 2022年3月24日 上午1:20

相关推荐