title: Tensorflow Strides Argument
body: <p>I am trying to understand the <strong>strides</strong> argument in tf.nn.avg_pool, tf.nn.max_pool, tf.nn.conv2d. </p>
  
  <p>The <a href="https://www.tensorflow.org/versions/master/api_docs/python/nn.html#max_pool" rel="noreferrer">documentation</a> repeatedly says </p>
  
  <blockquote>
    <p>strides: A list of ints that has length >= 4. The stride of the sliding window for each dimension of the input tensor.</p>
  </blockquote>
  
  <p>My questions are:</p>
  
  <ol>
  <li>What do each of the 4+ integers represent?</li>
  <li>Why must they have strides[0] = strides[3] = 1 for convnets?</li>
  <li>In <a href="https://github.com/aymericdamien/TensorFlow-Examples/blob/master/notebooks/3%20-%20Neural%20Networks/convolutional_network.ipynb" rel="noreferrer">this example</a> we see <code>tf.reshape(_X,shape=[-1, 28, 28, 1])</code>. Why -1?</li>
  </ol>
  
  <p>Sadly the examples in the docs for reshape using -1 don't translate too well to this scenario.</p>