title: I have indices in one tensor and values in another. How do I create a new tensor with this?
body: <p>Say my indices are:</p>
  <pre><code>indices = [6, 9, 2],
            [2, 2, 7],
            [0, 8, 4]
  </code></pre>
  <p>and my values are:</p>
  <pre><code>values = [0.35764236, 0.47342054, 0.61403205, 0.01948093, 0.21791322,
         0.53855718, 0.93596267, 0.3948243 , 0.22061542, 0.09633507]
  </code></pre>
  <p>Then in numpy I can simply do</p>
  <pre><code>new_array = values[indices]
  </code></pre>
  <p>to get:</p>
  <pre><code>new_array = [0.93596267, 0.09633507, 0.61403205]
              [0.61403205, 0.61403205, 0.3948243 ]
              [0.35764236, 0.22061542, 0.21791322]
  </code></pre>
  <p>This seems to not work in tensorflow 2. Neither am I able to use loops to assign values nor am I able to convert to numpy as I'm in a model.call. Is there a simple way of doing this in tensorflow.</p>