<p dir="auto"><em>Please make sure that this is a bug. As per our <a href="https://github.com/tensorflow/tensorflow/blob/master/ISSUES.md">GitHub Policy</a>, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:bug_template</em></p>
<p dir="auto"><strong>System information</strong></p>
<ul dir="auto">
<li>Have I written custom code (as opposed to using a stock example script provided in TensorFlow): no</li>
<li>OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Linux Ubuntu 18.04</li>
<li>Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device:</li>
<li>TensorFlow installed from (source or binary):</li>
<li>TensorFlow version (use command below): tensorflow-gpu==2.0.0rc0</li>
<li>Python version: 3.6.8</li>
<li>Bazel version (if compiling from source):</li>
<li>GCC/Compiler version (if compiling from source):</li>
<li>CUDA/cuDNN version:</li>
<li>GPU model and memory:</li>
</ul>
<p dir="auto">You can collect some of this information using our environment capture<br>
<a href="https://github.com/tensorflow/tensorflow/tree/master/tools/tf_env_collect.sh">script</a><br>
You can also obtain the TensorFlow version with: 1. TF 1.0: <code class="notranslate">python -c "import tensorflow as tf; print(tf.GIT_VERSION, tf.VERSION)"</code> 2. TF 2.0: <code class="notranslate">python -c "import tensorflow as tf; print(tf.version.GIT_VERSION, tf.version.VERSION)"</code></p>
<p dir="auto"><strong>Describe the current behavior</strong><br>
tf.scatter_nd sums update values if indices are present multiple times. I use this function for moving pixels in an image. Some pixels are present twice and this gives wrong pixel values in scatter.</p>
<p dir="auto">tf.Tensor([ 0 11  0 10  9  0  0 12], shape=(8,), dtype=int32)<br>
tf.Tensor([ 0 11  0 10  9  0  0 24], shape=(8,), dtype=int32)<br>
tf.Tensor([ 0 11  0 10  9  0  0 36], shape=(8,), dtype=int32)<br>
<strong>Describe the expected behavior</strong><br>
I expect this behavior:</p>
<p dir="auto">tf.Tensor([ 0 11  0 10  9  0  0 12], shape=(8,), dtype=int32)<br>
tf.Tensor([ 0 11  0 10  9  0  0 12], shape=(8,), dtype=int32)<br>
tf.Tensor([ 0 11  0 10  9  0  0 12], shape=(8,), dtype=int32)</p>
<p dir="auto">Otherwise I need to find unique indices and delete multiples. And why it is adding? Maybe other options are possible then too.</p>
<p dir="auto"><strong>Code to reproduce the issue</strong><br>
Provide a reproducible test case that is the bare minimum necessary to generate the problem.<br>
indices1 = tf.constant([[4], [3], [1], [7]])<br>
updates1 = tf.constant([9, 10, 11, 12])</p>
<p dir="auto">indices2 = tf.constant([[4], [3], [1], [7], [7]])<br>
updates2 = tf.constant([9, 10, 11, 12, 12])</p>
<p dir="auto">indices3 = tf.constant([[4], [3], [1], [7], [7], [7]])<br>
updates3 = tf.constant([9, 10, 11, 12, 12, 12])</p>
<p dir="auto">shape = tf.constant([8])</p>
<p dir="auto">scatter1 = tf.scatter_nd(indices1, updates1, shape)<br>
scatter2 = tf.scatter_nd(indices2, updates2, shape)<br>
scatter3 = tf.scatter_nd(indices3, updates3, shape)</p>
<p dir="auto">print(scatter1)<br>
print(scatter2)<br>
print(scatter3)</p>
<p dir="auto"><strong>Other info / logs</strong><br>
Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached.</p>
<p dir="auto">The following information are for installation issues</p>
<h3 dir="auto">What related GitHub issues or StackOverflow threads have you found by searching the web for your problem?</h3>
<p dir="auto"><a href="https://stackoverflow.com/questions/41605355/updating-the-supported-tags-for-pip#" rel="nofollow">https://stackoverflow.com/questions/41605355/updating-the-supported-tags-for-pip#</a></p>
<h3 dir="auto">Environment info</h3>
<p dir="auto">Operating System: windows</p>
<p dir="auto">Installed version of CUDA and cuDNN:<br>
(please attach the output of <code class="notranslate">ls -l /path/to/cuda/lib/libcud*</code>): Could not install tensorflow from pip, so could not reach this phase.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/6542274/22343817/91ae2194-e41f-11e6-8b7b-bf4fad6e7c9a.jpg"><img src="https://cloud.githubusercontent.com/assets/6542274/22343817/91ae2194-e41f-11e6-8b7b-bf4fad6e7c9a.jpg" alt="wheel not supported in windows plattform" style="max-width: 100%;"></a></p>
<p dir="auto">installed from binary pip package, provide:</p>
<ol dir="auto">
<li>link to the pip package you installed: using version pip 9.0.1</li>
</ol>
<h3 dir="auto">What other attempted solutions have you tried?</h3>
<p dir="auto">Haven't tried making tensorflow from source since I am on windows 7. I will be trying using cmake if that doesnt workout well I will be proceeding with linux environment in my PC by reinstalling the OS itself. :(</p>
<h3 dir="auto">Logs or other output that would be helpful</h3>
<p dir="auto">Attached screenshot</p>