class_docstr: PyTorch implementation containing all the modelling needed for your NLP task. Combines 2 language
  models for representation of 2 sequences and a prediction head. Allows for gradient flow back to the 2 language model components.
class_docstr_tok: ["PyTorch","implementation","containing","all","the","modelling","needed","for","your","NLP","task",".","Combines","2","language","models","for","representation","of","2","sequences","and","a","prediction","head",".","Allows","for","gradient","flow","back","to","the","2","language","model","components","."]
docstr: Verifies that the model fits to the tokenizer vocabulary.
  They could diverge in case of custom vocabulary added via tokenizer.add_tokens()
docstr_tok: ["Verifies","that","the","model","fits","to","the","tokenizer","vocabulary",".","They","could","diverge","in","case","of","custom","vocabulary","added","via","tokenizer.add_tokens","(",")"]
code: def verify_vocab_size(self, vocab_size1, vocab_size2):
      """Verifies that the model fits to the tokenizer vocabulary.
      They could diverge in case of custom vocabulary added via tokenizer.add_tokens()
      """
  
      model1_vocab_len = (
          self.language_model1.model.resize_token_embeddings(
              new_num_tokens=None
          ).num_embeddings
      )
  
      msg = (
          f"Vocab size of tokenizer {vocab_size1} doesn't match with model {model1_vocab_len}. "
          "If you added a custom vocabulary to the tokenizer, "
          "make sure to supply 'n_added_tokens' to LanguageModel.load() and BertStyleLM.load()"
      )
      assert vocab_size1 == model1_vocab_len, msg
  
      model2_vocab_len = (
          self.language_model2.model.resize_token_embeddings(
              new_num_tokens=None
          ).num_embeddings
      )
  
      msg = (
          f"Vocab size of tokenizer {vocab_size1} doesn't match with model {model2_vocab_len}. "
          "If you added a custom vocabulary to the tokenizer, "
          "make sure to supply 'n_added_tokens' to LanguageModel.load() and BertStyleLM.load()"
      )
      assert vocab_size2 == model2_vocab_len, msg
  
imports: import copy
  import json
  import logging
  import os
  from argparse import Namespace
  from pathlib import Path
  import multiprocessing
  import numpy
  import torch
  from torch import nn
  from farm.data_handler.processor import TextSimilarityProcessor
  from farm.data_handler.data_silo import DataSilo
  from farm.modeling.language_model import LanguageModel
  from farm.modeling.prediction_head import PredictionHead, TextSimilarityHead
  from farm.modeling.tokenization import Tokenizer
  from farm.utils import MLFlowLogger, stack
label_desc: Use image node_id 10 for calling the BiAdaptiveModel obj's underlying member method code with example usage: obj.verify_vocab_size(vocab_size1, vocab_size2) without return types