首页 > 技术文章 > 配置深度学习环境

linjin 2018-11-12 20:30 原文

window配置深度学习环境 vs2017(community)+Anaconda+cuda+cudnn

 conda activate [your environment name]
 python -m ipykernel install --name [your kernel name]//为环境创建kernel
- 如果出现“No module named ipykernel  ”,则
pip install --upgrade ipykernel    // 安装ipykenel
- 可在Jupyter Notebook中kernel中选择创建好的kernel
  • vs2017安装python环境
    • 1.在vs安装时勾选下图标注的红框
    • 2.如何在python项目中选择开发环境
      • 在vs2017中创建python项目
      • 在解决方案管理器中的【Python环境】
      • 右键出现可选择环境(环境可在anaconda中创建)

几点总结

  • cudnn版本与cuda版本要匹配
  • 选择与所选深度学习框架版本适配的cuda版本,深度学习框架适配的版本可查看框架的官网说明
  • Anaconda中Jupyter Notebook编译时会因某些依赖项未安装而报错,在环境中安装依赖项,确定安装后仍报错,可重启Jupyter Notebook或者重启电脑

ubuntu 16.04 torch7 + cuda/cudnn +ZeroBrane Studio编译环境

  • 安装参考指南
  • 以上参考指南中一些需要下载的包(如:hdf5)可“git clone ”github上的包,出现的一些坑的解决方法,参考指南
  • torch的相关问题查看 torch官网 的论坛、博客、github等上的文档资料
  • 安装IDE环境zbstudio,参考指南
    • 下载zbstudio
sudo luarocks install mobdebug //首先安装调试工具
sudo apt-get install git  // 安装git工具
git clone https://github.com/soumith/zbs-torch.git
  • 如果碰到问题:
    --error: RPC failed; result=56,HTTP code=200yte/s
    重复了几次都出现这个错误
    参考网页可知
    命令 sudo apt-get dist-upgrade 可解决这个问题
    - 打开zbstudio
 cd zbs-torch
./zbstudio.sh
 - 然后在打开的IDE中选择 Project -> Lua Interpreter-> Torch-7

就可以了
- 每次打开zbstudio时,先进入所在文件夹,然后执行zbstudio.sh文件

推荐阅读