class_docstr: The `UserTokenizer` class is required to be defined when a non-default model is used.
  
  The user's defined tokenizer is expected to return either token IDs or token embeddings that are fed into the model.
  The tokenizer vocabulary should contain some special tokens, such as a `<pad>` token so that a tokenization will run
  successfully in batches.
class_docstr_tok: ["The","`","UserTokenizer","`","class","is","required","to","be","defined","when","a","non-default","model","is","used",".","The","user","'s","defined","tokenizer","is","expected","to","return","either","token","IDs","or","token","embeddings","that","are","fed","into","the","model",".","The","tokenizer","vocabulary","should","contain","some","special","tokens",",","such","as","a","`","<","pad",">","`","token","so","that","a","tokenization","will","run","successfully","in","batches","."]
code: def __init__(self) -> None:
      self.word2vec = {
          "hello": 0.5 * torch.ones(1, _MODEL_DIM),
          "world": -0.5 * torch.ones(1, _MODEL_DIM),
          self.CLS_TOKEN: torch.zeros(1, _MODEL_DIM),
          self.SEP_TOKEN: torch.zeros(1, _MODEL_DIM),
          self.PAD_TOKEN: torch.zeros(1, _MODEL_DIM),
      }
  
file_path: torchmetrics/examples/bert_score-own_model.py
imports: from pprint import pprint
  from typing import Dict, List, Union
  import torch
  from torch import Tensor, nn
  from torch.nn import Module
  from torchmetrics.text.bert import BERTScore
label_desc: Use image node_id 1 to create a new UserTokenizer object  with example: obj = UserTokenizer()