code: def __init__(
      self,
      trunk,
      embedder=None,
      match_finder=None,
      normalize_embeddings=True,
      knn_func=None,
      data_device=None,
      dtype=None,
  ):
      self.trunk = trunk
      self.embedder = (
          torch.nn.Identity() if embedder is None else embedder
      )
      self.match_finder = (
          MatchFinder(distance=CosineSimilarity(), threshold=0.9)
          if match_finder is None
          else match_finder
      )
      self.knn_func = (
          FaissKNN(reset_before=False, reset_after=False)
          if knn_func is None
          else knn_func
      )
      self.normalize_embeddings = normalize_embeddings
      self.data_device = (
          c_f.use_cuda_if_available()
          if data_device is None
          else data_device
      )
      self.dtype = dtype
  
imports: import numpy
  import torch
  from ..distances import BatchedDistance, CosineSimilarity
  from .None import common_functions
label_desc: Use image node_id 1 to create a new InferenceModel object  with example: obj = InferenceModel(trunk, embedder, match_finder, normalize_embeddings, knn_func, data_device, dtype)