<p dir="auto">Hello,</p>
<p dir="auto">I have the same bug as this user.</p>
<p dir="auto"><a href="https://stackoverflow.com/questions/47423172/tensorflow-why-does-avg-pool-ignore-one-stride-dimension" rel="nofollow">https://stackoverflow.com/questions/47423172/tensorflow-why-does-avg-pool-ignore-one-stride-dimension</a></p>
<p dir="auto">My version is uo-to-date</p>
<p dir="auto">Have I written custom code: Yes<br>
OS Platform and Distribution: Linux Mint 18.3, codename "Sylvia"<br>
TensorFlow installed from Tensorflow Website<br>
TensorFlow version 14.1.0<br>
Bazel version N/A<br>
CUDA/cuDNN version N/A<br>
GPU model and memory GeForce 940MX<br>
Exact command to reproduce: see link</p>
<h3 dir="auto">System information</h3>
<ul dir="auto">
<li><strong>Have I written custom code (as opposed to using a stock example script provided in TensorFlow)</strong>: Yes</li>
<li><strong>OS Platform and Distribution (e.g., Linux Ubuntu 16.04)</strong>:Linux Ubuntu 16.04</li>
<li><strong>TensorFlow installed from (source or binary)</strong>: binary (conda-tensorflow-gpu)</li>
<li><strong>TensorFlow version (use command below)</strong>: <code class="notranslate">b'unknown' 1.3.0</code></li>
<li><strong>Python version</strong>: 3.6</li>
<li><strong>Bazel version (if compiling from source)</strong>: N/A</li>
<li><strong>GCC/Compiler version (if compiling from source)</strong>: N/A</li>
<li><strong>CUDA/cuDNN version</strong>: 9/7</li>
<li><strong>GPU model and memory</strong>: GeForce GTX 1050 Ti</li>
<li><strong>Exact command to reproduce</strong>:</li>
</ul>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import tensorflow as tf

x = tf.get_variable('x', shape=(100, 32, 32, 64),
        initializer=tf.constant_initializer(5), dtype=tf.float32)
ksize = (1, 2, 2, 2)
strides = (1, 2, 2, 2)
max_pool = tf.nn.max_pool(x, ksize, strides, padding='SAME')
avg_pool = tf.nn.avg_pool(x, ksize, strides, padding='SAME')
print(max_pool.shape)
print(avg_pool.shape)"><pre class="notranslate"><code class="notranslate">import tensorflow as tf

x = tf.get_variable('x', shape=(100, 32, 32, 64),
        initializer=tf.constant_initializer(5), dtype=tf.float32)
ksize = (1, 2, 2, 2)
strides = (1, 2, 2, 2)
max_pool = tf.nn.max_pool(x, ksize, strides, padding='SAME')
avg_pool = tf.nn.avg_pool(x, ksize, strides, padding='SAME')
print(max_pool.shape)
print(avg_pool.shape)
</code></pre></div>
<p dir="auto">The unexpected output is</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="(100, 16, 16, 32)
(100, 16, 16, 64)"><pre class="notranslate"><code class="notranslate">(100, 16, 16, 32)
(100, 16, 16, 64)
</code></pre></div>
<p dir="auto">It says <a href="https://github.com/Hvass-Labs/TensorFlow-Tutorials/issues/19#issuecomment-274249942" data-hovercard-type="issue" data-hovercard-url="/Hvass-Labs/TensorFlow-Tutorials/issues/19/hovercard">here</a> that first and last stride dimension must be 1, but apparently it isn't implemented like this. If this is a feature, there should be consistent behaviour and documentation.</p>
<p dir="auto">Link to StackOverflow question: <a href="https://stackoverflow.com/q/47423172/2397253" rel="nofollow">https://stackoverflow.com/q/47423172/2397253</a></p>