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: Forward pass for the BiAdaptive model.
  
  :param kwargs:
  :return: 2 tensors of pooled_output from the 2 language models
docstr_tok: ["Forward","pass","for","the","BiAdaptive","model",".",":","param","kwargs",":",":","return",":","2","tensors","of","pooled_output","from","the","2","language","models"]
code: def forward_lm(self, **kwargs):
      """
      Forward pass for the BiAdaptive model.
  
      :param kwargs:
      :return: 2 tensors of pooled_output from the 2 language models
      """
      pooled_output = [None, None]
      if "query_input_ids" in kwargs.keys():
          pooled_output1, hidden_states1 = self.language_model1(
              **kwargs
          )
          pooled_output[0] = pooled_output1
      if "passage_input_ids" in kwargs.keys():
          pooled_output2, hidden_states2 = self.language_model2(
              **kwargs
          )
          pooled_output[1] = pooled_output2
  
      return tuple(pooled_output)
  
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 8 for calling the BiAdaptiveModel obj's underlying member method code with example usage: obj.forward_lm() and returns: tuple