class_docstr: Base Class for implementing AdaptiveModel with frameworks like PyTorch and ONNX.
class_docstr_tok: ["Base","Class","for","implementing","AdaptiveModel","with","frameworks","like","PyTorch","and","ONNX","."]
docstr: Load corresponding AdaptiveModel Class(AdaptiveModel/ONNXAdaptiveModel) based on the
  files in the load_dir.
  
  :param kwargs: arguments to pass for loading the model.
  :return: instance of a model
docstr_tok: ["Load","corresponding","AdaptiveModel","Class","(","AdaptiveModel\/ONNXAdaptiveModel",")","based","on","the","files","in","the","load_dir",".",":","param","kwargs",":","arguments","to","pass","for","loading","the","model",".",":","return",":","instance","of","a","model"]
code: def load(cls, **kwargs):
      """
      Load corresponding AdaptiveModel Class(AdaptiveModel/ONNXAdaptiveModel) based on the
      files in the load_dir.
  
      :param kwargs: arguments to pass for loading the model.
      :return: instance of a model
      """
      if (Path(kwargs["load_dir"]) / "model.onnx").is_file():
          model = cls.subclasses["ONNXBiAdaptiveModel"].load(**kwargs)
      else:
          model = cls.subclasses["BiAdaptiveModel"].load(**kwargs)
      return model
  
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 3 for calling the BaseBiAdaptiveModel obj's underlying member method code with example usage: obj.load(cls) and returns: model