質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.50%
Python

Pythonは、コードの読みやすさが特徴的なプログラミング言語の1つです。 強い型付け、動的型付けに対応しており、後方互換性がないバージョン2系とバージョン3系が使用されています。 商用製品の開発にも無料で使用でき、OSだけでなく仮想環境にも対応。Unicodeによる文字列操作をサポートしているため、日本語処理も標準で可能です。

Q&A

解決済

1回答

5860閲覧

局所応答正規化と正規化のメソッドの違い

退会済みユーザー

退会済みユーザー

総合スコア0

Python

Pythonは、コードの読みやすさが特徴的なプログラミング言語の1つです。 強い型付け、動的型付けに対応しており、後方互換性がないバージョン2系とバージョン3系が使用されています。 商用製品の開発にも無料で使用でき、OSだけでなく仮想環境にも対応。Unicodeによる文字列操作をサポートしているため、日本語処理も標準で可能です。

0グッド

3クリップ

投稿2017/04/25 00:28

本を読んでTensorFlowの勉強をしています。
その中で、プーリング層と畳み込み層の間に
局所応答正規化の層を追加して精度を上げる、という話が出てきました。
しかし、TensorFlowには元々正規化のメソッドがある(softmax関数とか)ので、それが局所応答正規化のメソッド(nn.lrn関数)とどのように機能的に違うのかがわかりませんでした。
局所応答正規化と正規化のメソッドの違いはどのようなものなのでしょうか?

ちなみに、局所応答正規化の話が出てきた時のコード全体は以下の通りです。

# coding: utf-8 from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf NUM_CLASSES = 10 def _get_weights(shape,stddev=1.0): var = tf.get_variable( 'weights', shape, initializer=tf.truncated_normal_initializer(stddev=stddev) ) return var def _get_biases(shape,value=0.0): var = tf.get_variable( 'biases', shape, initializer=tf.constant_initializer(value) ) return var def inference(image_node): # conv1 with tf.variable_scope('conv1') as scope: weights = _get_weights(shape=[5,5,3,64],stddev=1e-4) conv = tf.nn.conv2d(image_node,weights,[1,1,1,1],padding='SAME') biases = _get_biases([64],value=0.1) bias = tf.nn.bias_add(conv,biases) conv1 = tf.nn.relu(bias,name=scope.name) # pool pool1 = tf.nn.max_pool(conv1,ksize=[1,3,3,1],strides=[1,2,2,1],padding='SAME',name='pool1') #norm1 norm1 = tf.nn.lrn(pool1,4,bias=1.0,alpha=0.001/9.0,beta=0.75,name='norml') # conv2 with tf.variable_scope('conv2') as scope: weights = _get_weights(shape=[5,5,64,64],stddev=1e-4) conv = tf.nn.conv2d(norm1,weights,[1,1,1,1],padding='SAME') biases = _get_biases([64],value=0.1) bias = tf.nn.bias_add(conv,biases) conv2 = tf.nn.relu(bias,name=scope.name) #norm2 norm2 = tf.nn.lrn(conv2,4,bias=1.0,alpha=0.001/9.0,beta=0.75,name='norm2') # pool2 pool2 = tf.nn.max_pool(norm2,ksize=[1,3,3,1],strides=[1,2,2,1],padding='SAME',name='pool2') reshape = tf.reshape(pool2,[1,-1]) dim = reshape.get_shape()[1].value # fc3 with tf.variable_scope('fc3') as scope: weights = _get_weights(shape=[dim,384],stddev=0.04) biases = _get_biases([384],value=0.1) fc3 = tf.nn.relu( tf.matmul(reshape,weights) + biases, name=scope.name ) # fc4 with tf.variable_scope('fc4') as scope: weights = _get_weights(shape=[384,192],stddev=0.04) biases = _get_biases([192],value=0.1) fc4 = tf.nn.relu(tf.matmul(fc3,weights) + biases,name=scope.name) # output with tf.variable_scope('output') as scope: weights = _get_weights(shape=[192,NUM_CLASSES],stddev=1/192.0) biases = _get_biases([NUM_CLASSES],value=0.0) logits = tf.add(tf.matmul(fc4,weights),biases,name='logits') return logits

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

ベストアンサー

局所応答正規化(Local Response Normalization=LRN)は、SoftMaxなどの一般的な正規化(関数)とは異なるものであり、関数というより手法です。
LRNの詳細については以下を参照ください。
theanoでLocal Response Normalization(LRN)を使う

投稿2017/04/25 09:18

can110

総合スコア38233

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.50%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問