What is the essential difference between `tf.contrib.layers.max_pool2d` and `tf.nn.max_pool`?
<p>I found two functions, <code>tf.contrib.layers.max_pool2d</code> and <code>tf.nn.max_pool</code>, for max pooling in TensorFlow.</p>

<p><code>tf.contrib.layers.max_pool2d</code> seems to be a wrapper of <code>tf.nn.max_pool</code>, but I could not understand what is the advantage of using `tf.contrib.layers.max_pool2d.</p>

<p>What is the essential difference between <code>tf.contrib.layers.max_pool2d</code> and <code>tf.nn.max_pool</code>?</p>

<p>Resources:</p>

<ul>
<li>document of <code>tf.contrib.layers.max_pool2d</code>

<ul>
<li><a href="https://www.tensorflow.org/versions/master/api_docs/python/contrib.layers.html#max_pool2d" rel="nofollow">https://www.tensorflow.org/versions/master/api_docs/python/contrib.layers.html#max_pool2d</a></li>
</ul></li>
<li>document of <code>tf.nn.max_pool</code>

<ul>
<li><a href="https://www.tensorflow.org/versions/master/api_docs/python/nn.html#max_pool" rel="nofollow">https://www.tensorflow.org/versions/master/api_docs/python/nn.html#max_pool</a></li>
</ul></li>
</ul>