class_docstr: Wasserstein Autoencoder model.
  
  Args:
      model_config (WAE_MMD_Config): The Autoencoder configuration setting the main parameters
          of the model.
  
      encoder (BaseEncoder): An instance of BaseEncoder (inheriting from `torch.nn.Module` which
          plays the role of encoder. This argument allows you to use your own neural networks
          architectures if desired. If None is provided, a simple Multi Layer Preception
          (https://en.wikipedia.org/wiki/Multilayer_perceptron) is used. Default: None.
  
      decoder (BaseDecoder): An instance of BaseDecoder (inheriting from `torch.nn.Module` which
          plays the role of encoder. This argument allows you to use your own neural networks
          architectures if desired. If None is provided, a simple Multi Layer Preception
          (https://en.wikipedia.org/wiki/Multilayer_perceptron) is used. Default: None.
  
  .. note::
      For high dimensional data we advice you to provide you own network architectures. With the
      provided MLP you may end up with a ``MemoryError``.
class_docstr_tok: ["Wasserstein","Autoencoder","model",".","Args",":","model_config","(","WAE_MMD_Config",")",":","The","Autoencoder","configuration","setting","the","main","parameters","of","the","model",".","encoder","(","BaseEncoder",")",":","An","instance","of","BaseEncoder","(","inheriting","from","`","torch.nn.Module","`","which","plays","the","role","of","encoder",".","This","argument","allows","you","to","use","your","own","neural","networks","architectures","if","desired",".","If","None","is","provided",",","a","simple","Multi","Layer","Preception","(","https",":","\/\/en.wikipedia.org\/wiki\/Multilayer_perceptron",")","is","used",".","Default",":","None",".","decoder","(","BaseDecoder",")",":","An","instance","of","BaseDecoder","(","inheriting","from","`","torch.nn.Module","`","which","plays","the","role","of","encoder",".","This","argument","allows","you","to","use","your","own","neural","networks","architectures","if","desired",".","If","None","is","provided",",","a","simple","Multi","Layer","Preception","(","https",":","\/\/en.wikipedia.org\/wiki\/Multilayer_perceptron",")","is","used",".","Default",":","None",".","..","note",":",":","For","high","dimensional","data","we","advice","you","to","provide","you","own","network","architectures",".","With","the","provided","MLP","you","may","end","up","with","a","``","MemoryError","``","."]
docstr: Returns a matrix of shape [batch x batch] containing the pairwise kernel computation
docstr_tok: ["Returns","a","matrix","of","shape","[","batch","x","batch","]","containing","the","pairwise","kernel","computation"]
code: def rbf_kernel(self, z1, z2):
      """Returns a matrix of shape [batch x batch] containing the pairwise kernel computation"""
  
      C = (
          2.0
          * self.model_config.latent_dim
          * self.model_config.kernel_bandwidth**2
      )
  
      k = torch.exp(
          -torch.norm(z1.unsqueeze(1) - z2.unsqueeze(0), dim=-1) ** 2
          / C
      )
  
      return k
  
file_path: benchmark_VAE/src/pythae/models/wae_mmd/wae_mmd_model.py
imports: import os
  from typing import Optional
  import torch
  import torch.nn.functional
  from pyexpat import model
  from ...data.datasets import BaseDataset
  from ..ae import AE
  from ..base.base_utils import ModelOutput
  from ..nn import BaseDecoder, BaseEncoder
  from .wae_mmd_config import WAE_MMD_Config
label_desc: Use image node_id 5 for calling the WAE_MMD obj's underlying member method code with example usage: obj.rbf_kernel(z1, z2) and returns: k