<p>There is a couple of tensorflow implementations here <a href="https://github.com/yselivonchyk/Tensorflow_WhatWhereAutoencoder/blob/master/pooling.py" rel="nofollow noreferrer" title="pooling.py">pooling.py</a></p>

<p>Namely:</p>

<p>1) unpool operation (<a href="https://arxiv.org/abs/1506.02351" rel="nofollow noreferrer">source</a>) that utilizes output of <code>tf.nn.max_pool_with_argmax</code>. Although please notice, that as of tensorflow 1.0 <code>tf.nn.max_pool_with_argmax</code> is GPU-only</p>

<p>2) upsample operation that mimics inverse of max-pooling by filling positions of unpooled region with either zeros or copies of max element.
Comparing to <a href="https://github.com/ppwwyyxx/tensorpack/blob/master/tensorpack/models/pool.py#L66" rel="nofollow noreferrer">tensorpack</a> it allows copies of elements instead of zeros and supports strides other than <code>[2, 2]</code>. </p>

<p>No recompile, back-prop friendly.</p>

<p>Illustration:
<a href="https://github.com/ppwwyyxx/tensorpack/blob/master/tensorpack/models/pool.py#L66" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7nKkL.png" alt="Upsampling"></a></p>

<p><a href="https://i.stack.imgur.com/7nKkL.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/oHaap.png" alt="Unpooling"></a></p>
TensorFlow: Unpooling
<p>Is there TensorFlow native function that does unpooling for Deconvolutional Networks ? </p>

<p>I have written this in normal python, but it is getting complicated when want to translate it to TensorFlow as it's objects does not even support item assignment at the moment, and I think this is a great inconvenience with TF.</p>