import tensorflow as tf
import numpy as np
a = np.array(range(16))
b = a.reshape([1,2,2,4])
with tf.Session() as sess:
print(sess.run(tf.nn.lrn(b)))
b: 形状大小:[1,2,2,4]
array([[[[ 0, 1, 2, 3],
[ 4, 5, 6, 7]],
[[ 8, 9, 10, 11],
[12, 13, 14, 15]]]])
LRN之后:
[[[[0. 0.2581989