<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.</li>
<li>OS Platform and Distribution: Ubuntu 18.04.</li>
<li>TensorFlow installed from pip</li>
<li>TensorFlow version 1.14 with GPU support</li>
<li>Python version: 3.7.3</li>
<li>CUDA/cuDNN version: 10</li>
</ul>
<p dir="auto"><strong>Describe the current behavior</strong></p>
<p dir="auto">Hi, when I am using the hessian_vector_product() to computer the hessian_vector_product of my model, it returns results organized as IndexedSliceValue. This is OK because the model include data structure like embeddings.</p>
<p dir="auto">However, when I do the assert on the indices of the returned IndexedSliceValue. I notice that there are duplicated indices with different corresponding values. May I know how to deal with these conflict &lt;indices, values&gt;? Thanks in advance.</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): binary</li>
<li>TensorFlow version (use command below): 2.0.0-rc0</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: CUDA 10.0</li>
<li>GPU model and memory: GeForce RTX 2080 Ti</li>
</ul>
<p dir="auto"><strong>Describe the current behavior</strong><br>
Running any of the saved models from <a href="https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/detection_model_zoo.md">tensorflow model zoo</a> leads to a segmentation fault.</p>
<p dir="auto"><strong>Code to reproduce the issue</strong></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import os
import tensorflow as tf
import numpy as np

os.system('wget http://download.tensorflow.org/models/object_detection/ssd_mobilenet_v2_coco_2018_03_29.tar.gz')
os.system('tar -xvf ssd_mobilenet_v2_coco_2018_03_29.tar.gz')

with tf.device('/device:GPU:0'):
    loaded_model = tf.saved_model.load('ssd_mobilenet_v2_coco_2018_03_29/saved_model')
    infer = loaded_model.signatures['serving_default']
    sample_img = np.zeros((1,128,128,3))
    predicted = infer(tf.constant(sample_img, tf.uint8))
    print(predicted)"><pre class="notranslate"><code class="notranslate">import os
import tensorflow as tf
import numpy as np

os.system('wget http://download.tensorflow.org/models/object_detection/ssd_mobilenet_v2_coco_2018_03_29.tar.gz')
os.system('tar -xvf ssd_mobilenet_v2_coco_2018_03_29.tar.gz')

with tf.device('/device:GPU:0'):
    loaded_model = tf.saved_model.load('ssd_mobilenet_v2_coco_2018_03_29/saved_model')
    infer = loaded_model.signatures['serving_default']
    sample_img = np.zeros((1,128,128,3))
    predicted = infer(tf.constant(sample_img, tf.uint8))
    print(predicted)
</code></pre></div>
<p dir="auto"><strong>gdb output</strong></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Thread 89 &quot;python3&quot; received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffbfbfff700 (LWP 7857)]
0x00007fff4372b741 in tensorflow::NonMaxSuppressionV2GPUOp::Compute(tensorflow::OpKernelContext*) ()
   from /usr/local/lib/python3.6/dist-packages/tensorflow_core/python/_pywrap_tensorflow_internal.so"><pre class="notranslate"><code class="notranslate">Thread 89 "python3" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffbfbfff700 (LWP 7857)]
0x00007fff4372b741 in tensorflow::NonMaxSuppressionV2GPUOp::Compute(tensorflow::OpKernelContext*) ()
   from /usr/local/lib/python3.6/dist-packages/tensorflow_core/python/_pywrap_tensorflow_internal.so
</code></pre></div>