[PYTHON] I installed and used the Deep Learning library Chainer

Installation

I installed Chainer, a PFI Deep Learning library. Basically as per QUICK START at http://chainer.org/ pip install chainer Installation is complete. Super easy. The environment I installed is Mac OS X Mavericks 10.9.5

Try moving a sample of sentiment analysis

https://github.com/pfnet/chainer/tree/master/examples/sentiment

When you execute download.sh, the data for analysis will be downloaded. Contains learning data, test data, and development data. This format.

(3 (2 (2 The) (2 Rock)) (4 (3 (2 is) (4 (2 destined) (2 (2 (2 (2 (2 to) (2 (2 be) (2 (2 the) (2 (2 21st) (2 (2 (2 Century) (2 's)) (2 (3 new) (2 (2 ``) (2 Conan)))))))) (2 '')) (2 and)) (3 (2 that) (3 (2 he) (3 (2 's) (3 (2 going) (3 (2 to) (4 (3 (2 make) (3 (3 (2 a) (3 splash)) (2 (2 even) (3 greater)))) (2 (2 than) (2 (2 (2 (2 (1 (2 Arnold) (2 Schwarzenegger)) (2 ,)) (2 (2 Jean-Claud) (2 (2 Van) (2 Damme)))) (2 or)) (2 (2 Steven) (2 Segal))))))))))))) (2 .)))

python train_sentiment.py Start learning at.

The learning result looks like this (halfway result)

Epoch: 0 loss: 272091.89 15.52 iters/sec, 550.39 sec

Epoch: 1 loss: 231616.00 16.56 iters/sec, 516.08 sec

Epoch: 2 loss: 214706.52 19.19 iters/sec, 445.15 sec

Epoch: 3 loss: 203173.80 14.26 iters/sec, 599.03 sec

Epoch: 4 loss: 193821.91 19.16 iters/sec, 445.83 sec

Train data evaluation: Node accuracy: 77.93 %% (248,265/318,582) Root accuracy: 39.56 %% (3,380/8,544) Develop data evaluation: Node accuracy: 74.72 %% (30,968/41,447) Root accuracy: 34.15 %% (376/1,101)

It seems to work for the time being, so let's try it with your own data.

Recommended Posts

I installed and used the Deep Learning library Chainer
I installed Chainer, a framework for deep learning
DNN (Deep Learning) Library: Comparison of chainer and TensorFlow (1)
(python) Deep Learning Library Chainer Basics Basics
I installed the automatic machine learning library auto-sklearn on centos7
[Machine learning] I will explain while trying the deep learning framework Chainer.
I installed and used Numba with Python3.5
I tried using the trained model VGG16 of the deep learning library Keras
Chainer and deep learning learned by function approximation
I tried deep learning
[Deep Learning from scratch] I implemented the Affine layer
I tried the changefinder library!
Where are matrix products and inner products used in deep learning?
Recognize your boss and hide the screen with Deep Learning
[Python] I installed the game from pip and played it
I captured the Touhou Project with Deep Learning ... I wanted to.
Let's move word2vec with Chainer and see the learning progress
Deep Learning Model Lightening Library Distiller
I installed the IoT platform "Rimotte"
Organize machine learning and deep learning platforms
Determine if the library is installed.
Microsoft's Deep Learning Library "CNTK" Tutorial
I tried deep learning using Theano
Summary of pages useful for studying the deep learning framework Chainer
Graph of the history of the number of layers of deep learning and the change in accuracy
I used phantomjs from Python's selenium library and it became a zombie
[Deep Learning from scratch] I tried to implement sigmoid layer and Relu layer.
I tried to learn the angle from sin and cos with chainer
I installed the library with Visual Studio Code, but Unable to import
I tried to visualize the model with the low-code machine learning library "PyCaret"
I tried to classify Oba Hana and Emiri Otani by deep learning
I tried the common story of using Deep Learning to predict the Nikkei 225
I tried the common story of predicting the Nikkei 225 using deep learning (backtest)
Classify anime faces with deep learning with Chainer
I installed DSX Desktop and tried it
Othello-From the tic-tac-toe of "Implementation Deep Learning" (3)
I installed Python 3.5.1 to study machine learning
Introduction to Deep Learning ~ Convolution and Pooling ~
Meaning of deep learning models and parameters
Try with Chainer Deep Q Learning --Launch
Visualize the effects of deep learning / regularization
Othello-From the tic-tac-toe of "Implementation Deep Learning" (2)
[Python] Deep Learning: I tried to implement deep learning (DBN, SDA) without using a library.
Deep Learning from scratch The theory and implementation of deep learning learned with Python Chapter 3
Build a python environment to learn the theory and implementation of deep learning
I tried running an object detection tutorial using the latest deep learning algorithm
I tried to process and transform the image and expand the data for machine learning
I tried to implement Cifar10 with SONY Deep Learning library NNabla [Nippon Hurray]
Deep Learning
I tried to classify Oba Hana and Emiri Otani by deep learning (Part 2)
I checked the library for using the Gracenote API
The story of doing deep learning with TPU
A memorandum of studying and implementing deep learning
Extend and inflate your own Deep Learning dataset
Checking methods and variables using the library see
Parallel learning of deep learning by Keras and Kubernetes
Introduction to Deep Learning ~ Localization and Loss Function ~
I read and implemented the Variants of UKR
I tried using the functional programming library toolz
Install the machine learning library TensorFlow on fedora23
Overview and useful features of scikit-learn that can also be used for deep learning