def intersection_op(set1_embs, set1_sketch,
                    set2_embs,
                    set2_sketch):
  """Compute intersection between two sets.

  Args:
    set1_embs: dense embeddings of set1.
    set1_sketch: sparse count-min sketch of set1.
    set2_embs: dense embeddings of set2.
    set2_sketch: sparse count-min sketch of set2.
  Returns:
    Set embeddings and sketches for intersected set.
  """
  intersection_embs = set1_embs + set2_embs
  intersection_sketch = tf.minimum(set1_sketch, set2_sketch)
  return intersection_embs, intersection_sketch
Compute intersection between two sets.

  Args:
    set1_embs: dense embeddings of set1.
    set1_sketch: sparse count-min sketch of set1.
    set2_embs: dense embeddings of set2.
    set2_sketch: sparse count-min sketch of set2.
  Returns:
    Set embeddings and sketches for intersected set.
  
language/emql/module.py