科探空谷
  • Home
  • zhimind home
  • Categories
  • Tags
  • Archives
  • 留学
    • 学校库
    • 专业库
    • 研究方向与招生
    • 工具
    • GPA计算器
    • 脑洞背单词
    • 脱口而出

Theano-Chainer

目录

  • Chainer
    • Installation to use GPU 安装
    • initialize/update the weight by numpy
  • Theano
    • 安装建议 suggestion
      • Error information
目录

Chainer¶

Installation to use GPU 安装¶

The backend is based on cupy. Choose the right version of cuda.

Chainer 后端用的是cupy,需要根据cuda版本选择。

If your cudnn path is not in the $CUDA_PATH directory, you must set:

如果你的 cudnn 安装位置和 cuda不是同一个文件夹, 安装前必须设置以下环境变量:

export CFLAGS=-I/path/to/cudnn/include
export LDFLAGS=-L/path/to/cudnn/lib
export LD_LIBRARY_PATH=/path/to/cudnn/lib:$LD_LIBRARY_PATH

Refer to these two links: install cupy, and install cudnn

initialize/update the weight by numpy¶

Reference to normal initializer

Its implementation is different from PyTorch.

Theano¶

要使用 GPU 的话, 需要 pygpu 库, 好像只能用 conda 安装, pip 是找不到这个库的.

We need pygpu library to utilize GPU, so it seems that only conda support pygpu, I can't find the library by pip.

但是 tensorboardx 是不能用conda装的

tensorboardX need to use pip to install.

安装建议 suggestion¶

python 2.7 直接使用 conda install theano pygpu

python 3 可能更有效方式,

conda install pygpu libgpuarray numpy==1.15.4 theano -c mila-udem

本来我以为要分两步

  1. conda install pygpu or conda install theano pygpu
  2. update theano using pip. pip install theano==1.0.4

Error information¶

  1. Mixed dnn version. The header is version xxx while the library is version yyyy
  2. theano seems not work > 3.5
  3. conda only has theano==1.0.2, but I encounter the 1. mixed dnn version problem.

Published

2月 19, 2019

Last Updated

12月 19, 2019

Category

深度学习

Tags

  • 人工智能 28
  • 深度学习 机器学习 4

Stay in Touch

  • Powered by Pelican. Theme: Elegant by Talha Mansoor