Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what does the tf.nn.lrn() method do?

Tags:

tensorflow

Here is the code-snipped from the cifar10-tutorial. It's from the cifar10.py.

# conv1
with tf.variable_scope('conv1') as scope:
kernel = _variable_with_weight_decay('weights', shape=[5, 5, 3, 64],
                                     stddev=1e-4, wd=0.0)
conv = tf.nn.conv2d(images, kernel, [1, 1, 1, 1], padding='SAME')
biases = _variable_on_cpu('biases', [64], tf.constant_initializer(0.0))
bias = tf.nn.bias_add(conv, biases)
conv1 = tf.nn.relu(bias, name=scope.name)
_activation_summary(conv1)

# pool1
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='norm1')

What does the tf.nn.lrn-Method do? I can't find a definition in the API Documentation on https://www.tensorflow.org/versions/r0.8/api_docs/python/index.html

like image 572
Simon Avatar asked May 22 '16 16:05

Simon


1 Answers

tf.nn.lrn is a short for tf.nn.local_response_normalization. Therefore, the documentation you may want to look at is: https://www.tensorflow.org/api_docs/python/tf/nn/local_response_normalization

like image 101
nessuno Avatar answered Sep 28 '22 20:09

nessuno