class_docstr: Computes VQA accuracy and F1 metrics.
  
  Since jax does not support strings, during the compute phase, which is done
  outside of pmap and other jax functions, converts the integer word/text
  predictions into words/strings which are used to compute the scores.
  
  Attributes:
    predictions: jnp.ndarray of integers representing word/text predictions.
    targets: jnp.ndarray of integers representing ground truth words/text.
class_docstr_tok: ["Computes","VQA","accuracy","and","F1","metrics",".","Since","jax","does","not","support","strings",",","during","the","compute","phase",",","which","is","done","outside","of","pmap","and","other","jax","functions",",","converts","the","integer","word\/text","predictions","into","words\/strings","which","are","used","to","compute","the","scores",".","Attributes",":","predictions",":","jnp.ndarray","of","integers","representing","word\/text","predictions",".","targets",":","jnp.ndarray","of","integers","representing","ground","truth","words\/text","."]
code: def compute_value(self) -> dict[str, clu_values.Value]:
      metric_values = self.compute()
      metric_results = {
          key: clu_values.Scalar(value)
          for key, value in metric_values.items()
      }
      return metric_results
  
file_path: scenic/scenic/projects/knowledge_visual_language/models/metrics_vqa.py
imports: import string
  from typing import Any
  from clu import metrics
  import clu.values
  import flax
  import jax.numpy
  import numpy
  from scenic.projects.knowledge_visual_language.data import data_utils
  from scenic.projects.t5 import tokenizer
  from scenic.projects.vit_vqa.models import qa_utils
label_desc: Use image node_id 2 for calling the VQAMetrics obj's underlying member method code with example usage: obj.compute_value() and returns: metric_results