機械学習・自然言語処理の勉強メモ

学んだことのメモやまとめ

DeepLearning 0.1

TheanoでStacked Autoencoder

前回の続編で、今回はStacked Autoencoder(積層自己符号化器) kento1109.hatenablog.comこのdocumantationを整理する。 Stacked Denoising Autoencoders (SdA) — DeepLearning 0.1 documentation今回もStacked Autoencoderに関する基本知識は、「MLP 深層…

TheanoでDenoising Autoencoder

今回は下記のdocumantationを整理して、Autoencoder(自己符号化器)を理解する。Denoising Autoencoders (dA) — DeepLearning 0.1 documentation下記のまとめが分かりやすかった。sinhrks.hatenablog.com aidiary.hatenablog.com文献としては下記を参考とし…

TheanoでLSTM③

前回の続き kento1109.hatenablog.com前回は、lstm_layerの内容を見てきた。 このように呼んでいたので、 proj = lstm_layer(tparams, emb, options, prefix=options['encoder'], mask=mask) projには、lstm_layerの戻り値のhがセットされる。 ※hは文字の長…

TheanoでLSTM②

前回の続き kento1109.hatenablog.com今回はLSTM層の構築から見ていく。 lstm_layer nsteps = state_below.shape[0] if state_below.ndim == 3: n_samples = state_below.shape[1] else: n_samples = 1 state_belowは、emb、 つまり、nstepsは、文書の長さ ※…

TheanoでLSTM①

下記のdocumentationについて整理する。LSTM Networks for Sentiment Analysis — DeepLearning 0.1 documentation はじめに コードを読んでいく前に全体の概要を掴む。コードについては下記の2ファイル lstm.py : モデルの定義&訓練 imdb.py : IMDB データ…

TheanoでRNN②

RNNの続きkento1109.hatenablog.com前回で、elman.pyの__init__部をまとめた。 今回は、elman-forward.pyのRNNインスタンス生成後のコードを呼んでいく。前回の内容で rnn = model(nh = s['nhidden'], nc = nclasses, ne = vocsize, de = s['emb_dimension']…

TheanoでRNN①

下記のdocumentationについて整理する。Recurrent Neural Networks with Word Embeddings — DeepLearning 0.1 documentation タスクについて assigning a label to each word given a sentence. It’s a classification task. とある通り、文章の各単語のタグ…

TheanoでLogistic Regression(ロジスティック回帰)

下記のdocumentationの整理を行う。Classifying MNIST digits using Logistic Regression — DeepLearning 0.1 documentation LogisticRegressionインスタンスの生成 例題の入力は28×28のMNIST画像。 出力は1~10までの数値。(10クラス分類) # construct th…

TheanoでMLP(多層パーセプトロン)

下記のdocumentationについて整理する。Multilayer Perceptron — DeepLearning 0.1 documentationモデルイメージはこんなん。 MLPインスタンスの生成 まずは、MLPインスタンスを下記のように生成する。 # construct the MLP class classifier = MLP( rng=rng…

TheanoのLeNetConvPoolLayerについて

Theano(LeNetConvPoolLayer) LeNetConvPoolLayerクラスのチュートリアルはここ。 Convolutional Neural Networks (LeNet) — DeepLearning 0.1 documentation 論文の実装をするときは、このクラスを元に実装するのが正攻法だと思う。 なんで、LeNetConvPoolLa…