<p dir="auto">GitHub issues are for bugs / installation problems / feature requests.<br>
For general support from the community, see <a href="https://stackoverflow.com/questions/tagged/tensorflow" rel="nofollow">StackOverflow</a>.<br>
To make bugs and feature requests more easy to find and organize, we close issues that are deemed<br>
out of scope for GitHub Issues and point people to StackOverflow.</p>
<p dir="auto">For bugs or installation issues, please provide the following information.<br>
The more information you provide, the more easily we will be able to offer<br>
help and advice.</p>
<h3 dir="auto">Environment info</h3>
<p dir="auto">Operating System: Linux Ubuntu 14.04</p>
<p dir="auto">Installed version of CUDA and cuDNN: None<br>
(please attach the output of <code class="notranslate">ls -l /path/to/cuda/lib/libcud*</code>):</p>
<p dir="auto">If installed from binary pip package, provide: pip package:<br>
tensorflow-0.8.0-cp34-cp34m-linux_x86_64.whl</p>
<ol dir="auto">
<li>Which pip package you installed.</li>
<li>The output from python -c "import tensorflow; print(tensorflow.<strong>version</strong>)".</li>
</ol>
<p dir="auto">If installed from sources, provide the commit hash:</p>
<h3 dir="auto">Steps to reproduce</h3>
<ol dir="auto">
<li>include a max_pool_with_argmax layer in a convolutional neural network and use it for training.<br>
The process terminate with this error:<br>
LookupError: No gradient defined for operation 'conv2/MaxPoolWithArgmax' (op type: MaxPoolWithArgmax)</li>
</ol>
<p dir="auto">I swapped out the first max_pool operation in <a href="https://github.com/tensorflow/tensorflow/blob/r0.7/tensorflow/models/image/mnist/convolutional.py">convolutional.py</a> tutorial for a max_pool_with_argmax operation and there doesn't seem to exist a gradient for that op:</p>
<p dir="auto"><code class="notranslate">(virtenv)$ python convolutional.py</code><br>
<code class="notranslate">Extracting data/train-images-idx3-ubyte.gz</code><br>
<code class="notranslate">Extracting data/train-labels-idx1-ubyte.gz</code><br>
<code class="notranslate">Extracting data/t10k-images-idx3-ubyte.gz</code><br>
<code class="notranslate">Extracting data/t10k-labels-idx1-ubyte.gz</code><br>
<code class="notranslate">Traceback (most recent call last):</code><br>
<code class="notranslate">File "convolutional.py", line 316, in &lt;module&gt;</code><br>
<code class="notranslate">tf.app.run()</code><br>
<code class="notranslate">File "/home/name/virtenv/local/lib/python2.7/site-packages/tensorflow/python/platform/default/_app.py", line 30, in run</code><br>
<code class="notranslate">sys.exit(main(sys.argv))</code><br>
<code class="notranslate">File "convolutional.py", line 244, in main</code><br>
<code class="notranslate">global_step=batch)</code><br>
<code class="notranslate">File "/home/name/virtenv/local/lib/python2.7/site-packages/tensorflow/python/training/optimizer.py", line 190, in minimize</code><br>
<code class="notranslate">colocate_gradients_with_ops=colocate_gradients_with_ops)</code><br>
<code class="notranslate">File "/home/name/virtenv/local/lib/python2.7/site-packages/tensorflow/python/training/optimizer.py", line 241, in compute_gradients</code><br>
<code class="notranslate">colocate_gradients_with_ops=colocate_gradients_with_ops)</code><br>
<code class="notranslate">File "/home/name/virtenv/local/lib/python2.7/site-packages/tensorflow/python/ops/gradients.py", line 453, in gradients</code><br>
<code class="notranslate">(op.name, op.type))</code><br>
<code class="notranslate">LookupError: No gradient defined for operation 'MaxPoolWithArgmax' (op type: MaxPoolWithArgmax)</code></p>
<h3 dir="auto">Environment info</h3>
<p dir="auto">Operating System: Ubuntu 14.04.1 LTS</p>
<p dir="auto">If installed from binary pip package, provide:</p>
<p dir="auto">(virtenv)$ pip install --upgrade <a href="https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.7.1-cp27-none-linux_x86_64.whl" rel="nofollow">https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.7.1-cp27-none-linux_x86_64.whl</a><br>
(virtenv)$ python -c "import tensorflow; print(tensorflow.<strong>version</strong>)"<br>
0.7.1</p>
<h3 dir="auto">Steps to reproduce</h3>
<ol dir="auto">
<li>
<p dir="auto">Change line 192-5 of <a href="https://github.com/tensorflow/tensorflow/blob/r0.7/tensorflow/models/image/mnist/convolutional.py">convolutional.py</a> from:</p>
<p dir="auto"><code class="notranslate">pool = tf.nn.max_pool(relu, ksize=[1, 2, 2, 1], strides=[1, 2, 2, 1], padding='SAME')</code></p>
<p dir="auto">to:</p>
<p dir="auto"><code class="notranslate">pool, pos = tf.nn.max_pool_with_argmax(relu, ksize=[1, 2, 2, 1], strides=[1, 2, 2, 1], padding='SAME')</code></p>
</li>
<li>
<p dir="auto">Run:</p>
<p dir="auto"><code class="notranslate">(virtenv)$ python convolutional.py</code></p>
</li>
</ol>
<h3 dir="auto">What have you tried?</h3>
<ol dir="auto">
<li></li>
</ol>
<h3 dir="auto">Logs or other output that would be helpful</h3>
<p dir="auto">(If logs are large, please upload as attachment).</p>