I use pyenv to manage the python version. Please refer to here for pyenv. The version of python used in the text is as follows.
python --version
>> Python 2.7.9 :: Anaconda 2.1.0 (x86_64)
Installation is easy. (For details, see chainer official repository) Type the following command in the terminal.
pip install chainer
(By the way, please refer to here to prepare the python environment.)
When performing image processing, high-speed calculation is enabled by using GPU (Graphics Processing Unit). (For more information on machine learning and GPU, see here) To use the GPU, install CUDA (it doesn't matter if you don't install it).
pip install chainer-cuda-deps
To get the sample code working, [Official Repository] Please git clone from (https://github.com/pfnet/chainer).
[Official repository] above Download the sample code from (https://github.com/pfnet/chainer). There is sample code using the MNIST dataset in the chainer / examples / mnist directory. The MNIST dataset is a dataset containing 70,000 handwritten numbers from 0 to 9.
python train_mnist.py
If you type the above command in the corresponding directory, the sample code will run.
If you want to see the result of the sample code quickly
n_epoch = 20
It is recommended to reduce the above learning_loop.
Recommended Posts