class_docstr: Tests for ViT+ utilities.
class_docstr_tok: ["Tests","for","ViT+","utilities","."]
code: def test_dot_product_similarity(self):
      b, n, m, d = 2, 3, 4, 5
      rng = jax.random.PRNGKey(0)
      rng_x, rng_y = jax.random.split(rng)
      x = jax.random.uniform(rng_x, (b, n, d))
      y = jax.random.uniform(rng_y, (b, m, d))
  
      self_sim = utils.dot_product_similarity(x, x)
      self.assertEqual(self_sim.shape, (b, n, n))
  
      cross_sim = utils.dot_product_similarity(x, y)
      self.assertEqual(cross_sim.shape, (b, n, m))
  
file_path: scenic/scenic/projects/owl_vit/tests/utils_test.py
imports: from absl.testing import absltest
  from absl.testing import parameterized
  import jax
  import jax.numpy
  import numpy
  from scenic.projects.owl_vit import utils
label_desc: Use image node_id 7 for calling the UtilsTest obj's underlying member method code with example usage: obj.test_dot_product_similarity() without return types