class_docstr: Tests evaluation metrics specific to ViViT model.
docstr: Test pairwise accuracy calculation.
code: def test_joint_accuracy(self):
      """Test pairwise accuracy calculation."""
  
      c_1 = 3
      c_2 = 2
      class_splits = jnp.array([c_1, c_1 + c_2])
      logits = jnp.array(
          [
              [1, 2, 3, 4, 5],
              [1, 2, 3, 4, 5],
              [1, 2, 3, 4, 5],
              [1, 2, 3, 4, 5],
          ]
      )
      one_hot_labels = jnp.array(
          [
              [0, 1, 0, 1, 0],
              [0, 0, 1, 1, 0],
              [0, 1, 0, 0, 1],
              [0, 0, 1, 0, 1],
          ]
      )
  
      accuracy = model_utils.joint_accuracy(
          logits, one_hot_labels, class_splits
      )
      expected_accuracy = jnp.array([0, 0, 0, 1]).astype(jnp.int32)
  
      np.testing.assert_almost_equal(
          np.array(expected_accuracy), np.array(accuracy)
      )
  
file_path: scenic/scenic/projects/vivit/tests/test_vivit_metrics.py
imports: from absl.testing import absltest
  import jax.numpy
  import numpy
  from scenic.projects.vivit import evaluation_lib
  from scenic.projects.vivit import model_utils
label_desc: Use image node_id 1 for calling the EvaluationMetricsTester obj's underlying member method code with example usage: obj.test_joint_accuracy() without return types