class_docstr: This is an implementation of JAN for video data.
code: def _compute_mmd(self, phi_s, phi_t, y_hat, y_t_hat):
      softmax_layer = torch.nn.Softmax(dim=-1)
      source_list = [phi_s, softmax_layer(y_hat)]
      target_list = [phi_t, softmax_layer(y_t_hat)]
      batch_size = int(phi_s.size()[0])
  
      joint_kernels = None
      for source, target, k_mul, k_num, sigma in zip(
          source_list,
          target_list,
          self._kernel_mul,
          self._kernel_num,
          [None, 1.68],
      ):
          kernels = losses.gaussian_kernel(
              source,
              target,
              kernel_mul=k_mul,
              kernel_num=k_num,
              fix_sigma=sigma,
          )
          if joint_kernels is not None:
              joint_kernels = joint_kernels * kernels
          else:
              joint_kernels = kernels
  
      return losses.compute_mmd_loss(joint_kernels, batch_size)
  
imports: import torch
  import kale.predict.losses
  from kale.loaddata.video_access import get_image_modality
  from kale.pipeline.domain_adapter import BaseMMDLike, CDANTrainer, DANNTrainer, GradReverse, Method, set_requires_grad, WDGRLTrainer
label_desc: Use image node_id 2 for calling the JANTrainerVideo obj's underlying member method code with example usage: obj._compute_mmd(phi_s, phi_t, y_hat, y_t_hat) and returns: losses