Deep Learning is a hot topic in recent years. There are various frameworks such as Caffe and TensorFlow, but I'm mostly Chainer. I usually use Ubuntu 14.04, but the other day I had to handle Chainer on a Windows machine, and I couldn't install Chainer as smoothly as I did on Ubuntu, so it took a lot of time. I think it's a rare case, but I've summarized where it got caught and how to solve it.
I will omit the introduction of Python and Git. By the way, since it was a CPU environment, I can't explain about CUDA etc.
It seems that chainer cannot be installed unless numpy, scipy, and h5py are installed.
When installing these modules, I can't install them by suddenly doing "pip install numpy". Apparently you need to install from a compiled file called whl. There are various whl files on this site, so download them here. Once you've downloaded the whl file you need, use that file to pip install. Below is an example of numpy.
cd [directory with whl files]
pip install numpy-1.11.1+mkl-cp27-cp27m-win_amd64.whl
Install scipy and h5py from the whl file as well.
$ pip install [module name] --proxy = [user] @ [proxy]: [port]
Well, there is no chainer whl file on the previous site. (As of 2016/06/30) So let's clone the code from GitHub and build it.
$ git clone https://github.com/pfnet/chainer.git
$ cd chainer
$ python setup.py install
I think it will appear in the error message, but it seems that Visual Studio C ++ is required Download and install from here
You should finally be able to install it.
Let's recognize MNIST in Example to check if Chainer was installed properly. Try running the following in the directory you've git cloned into.
$ python examples/mnist/train_mnist.py
GPU: -1
unit: 1000
Minibatch-size: 100
epoch: 20
Network type: simple
load MNIST dataset
epoch 1
graph generated
train mean loss=0.190369202715, accuracy=0.941016668603, throughput=994.727940618 images/sec
test mean loss=0.0899474363861, accuracy=0.970900004506
epoch 2
・
・
・
It took about 10 minutes because it is a CPU environment
It seems that bash will be introduced in Windows 10, so I think that it will not be necessary to take such troublesome steps in the future. If you can't wait until it is introduced, please try this method.
Recommended Posts