class_docstr: Base class for all domain adaptation architectures
  
  Args:
      dataset (kale.loaddata.multi_domain): the multi-domain datasets to be used for train, validation, and tests.
      feature_extractor (torch.nn.Module): the feature extractor network
      task_classifier (torch.nn.Module): the task classifier network
      n_classes (int): number of classes
      target_domain (str): target domain name
code: def __init__(
      self,
      dataset,
      feature_extractor,
      task_classifier,
      n_classes: int,
      target_domain: str,
      **base_params,
  ):
      super().__init__(
          dataset, feature_extractor, task_classifier, **base_params
      )
      self.n_classes = n_classes
      self.feature_dim = feature_extractor.state_dict()[
          list(feature_extractor.state_dict().keys())[-2]
      ].shape[0]
      self.domain_to_idx = dataset.domain_to_idx
      if target_domain not in self.domain_to_idx.keys():
          raise ValueError(
              "The given target domain %s not in the dataset! The available domain names are %s"
              % (target_domain, self.domain_to_idx.keys())
          )
      self.target_domain = target_domain
      self.target_label = self.domain_to_idx[target_domain]
      self.base_params = base_params
  
imports: import torch
  import torch.nn
  from sklearn.base import BaseEstimator, ClassifierMixin
  from sklearn.metrics.pairwise import pairwise_kernels
  from sklearn.preprocessing import LabelBinarizer
  from torch.linalg import multi_dot
  from torch.nn.functional import one_hot
  import kale.predict.losses
  from kale.embed.image_cnn import _Bottleneck
  from kale.pipeline.domain_adapter import BaseAdaptTrainer
label_desc: Use image node_id 1 to create a new BaseMultiSourceTrainer object from inherited base classes: BaseAdaptTrainer with example: obj = BaseMultiSourceTrainer(dataset, feature_extractor, task_classifier, n_classes, target_domain)