title: Find the intersection of two tensors. Return the sorted, unique values that are in both of the input tensors
body: <p>Hi Tensorflow Beginner here,</p>
  
  <p>I want to remove any numpy code in implementation and only use tensorflow functions. Currently I'm trying to filter out Background Bounding Boxes and boxes with a low confidence score. For that I want a index called <em>keep</em> that I can use to keep track of which boxes to keep:</p>
  
  <pre><code># Filter out background boxes
  keep = np.where(class_ids &gt; 0)[0]
  # Filter out low confidence boxes
  if config.DETECTION_MIN_CONFIDENCE:
      keep = np.intersect1d(
          keep, np.where(class_scores &gt;= config.DETECTION_MIN_CONFIDENCE)[0])
  </code></pre>
  
  <p>class_ids is a tensor of shape (1000,) where each entry is a number between 0 and 80 depending on the class (81 classes in total).</p>
  
  <p>class_scores is a tensor of shape (1000,) where each entry is a probability for the class of the corresponding bounding box.</p>
  
  <p>I know that np.where() is easily changed to tf.where but how can I get the same functionality as np.intersect1d() with tensorflow?</p>
  
  <p>Thanks for the help.</p>