class_docstr: Base class for dynamic graph construction.
  
  Parameters
  ----------
  sim_metric_type : str, optional
      Specify similarity metric function type including "attention",
      "weighted_cosine", "gat_attention", "rbf_kernel", and "cosine".
      Default: ``"weighted_cosine"``.
  num_heads : int, optional
      Specify the number of heads for multi-head similarity metric
      function, default: ``1``.
  top_k_neigh : int, optional
      Specify the top k value for knn neighborhood graph sparsificaiton,
      default: ``None``.
  epsilon_neigh : float, optional
      Specify the epsilon value (i.e., between ``0`` and ``1``) for
      epsilon neighborhood graph sparsificaiton, default: ``None``.
  smoothness_ratio : float, optional
      Specify the smoothness ratio (i.e., between ``0`` and ``1``)
      for graph regularization on smoothness, default: ``None``.
  connectivity_ratio : float, optional
      Specify the connectivity ratio (i.e., between ``0`` and ``1``)
      for graph regularization on connectivity, default: ``None``.
  sparsity_ratio : float, optional
      Specify the sparsity ratio (i.e., between ``0`` and ``1``)
      for graph regularization on sparsity, default: ``None``.
  input_size : int, optional
      The dimension of input embeddings, default: ``None``.
  hidden_size : int, optional
      The dimension of hidden layers, default: ``None``.
class_docstr_tok: ["Base","class","for","dynamic","graph","construction",".","Parameters","--","--","--","--","--","sim_metric_type",":","str",",","optional","Specify","similarity","metric","function","type","including","``","attention","''",",","``","weighted_cosine","''",",","``","gat_attention","''",",","``","rbf_kernel","''",",","and","``","cosine","''",".","Default",":","``","``","weighted_cosine","''","``",".","num_heads",":","int",",","optional","Specify","the","number","of","heads","for","multi-head","similarity","metric","function",",","default",":","``","1","``",".","top_k_neigh",":","int",",","optional","Specify","the","top","k","value","for","knn","neighborhood","graph","sparsificaiton",",","default",":","``","None","``",".","epsilon_neigh",":","float",",","optional","Specify","the","epsilon","value","(","i.e.",",","between","``","0","``","and","``","1","``",")","for","epsilon","neighborhood","graph","sparsificaiton",",","default",":","``","None","``",".","smoothness_ratio",":","float",",","optional","Specify","the","smoothness","ratio","(","i.e.",",","between","``","0","``","and","``","1","``",")","for","graph","regularization","on","smoothness",",","default",":","``","None","``",".","connectivity_ratio",":","float",",","optional","Specify","the","connectivity","ratio","(","i.e.",",","between","``","0","``","and","``","1","``",")","for","graph","regularization","on","connectivity",",","default",":","``","None","``",".","sparsity_ratio",":","float",",","optional","Specify","the","sparsity","ratio","(","i.e.",",","between","``","0","``","and","``","1","``",")","for","graph","regularization","on","sparsity",",","default",":","``","None","``",".","input_size",":","int",",","optional","The","dimension","of","input","embeddings",",","default",":","``","None","``",".","hidden_size",":","int",",","optional","The","dimension","of","hidden","layers",",","default",":","``","None","``","."]
docstr: Compute distance matrix for RBF kernel.
  
  Parameters
  ----------
  X : torch.Tensor
      The input node embedding matrix.
  weight : torch.Tensor, optional
      The learnable weight matrix, default ``None``.
  
  Returns
  -------
  torch.Tensor
      The distance matrix.
docstr_tok: ["Compute","distance","matrix","for","RBF","kernel",".","Parameters","--","--","--","--","--","X",":","torch.Tensor","The","input","node","embedding","matrix",".","weight",":","torch.Tensor",",","optional","The","learnable","weight","matrix",",","default","``","None","``",".","Returns","--","--","--","-","torch.Tensor","The","distance","matrix","."]
code: def _compute_distance_matrix(self, X, weight=None):
      """Compute distance matrix for RBF kernel.
  
      Parameters
      ----------
      X : torch.Tensor
          The input node embedding matrix.
      weight : torch.Tensor, optional
          The learnable weight matrix, default ``None``.
  
      Returns
      -------
      torch.Tensor
          The distance matrix.
      """
      if weight is not None:
          trans_X = torch.mm(X, weight)
      else:
          trans_X = X
  
      norm = torch.sum(trans_X * X, dim=-1)
      dists = (
          -2 * torch.matmul(trans_X, X.transpose(-1, -2))
          + norm.unsqueeze(0)
          + norm.unsqueeze(1)
      )
  
      return dists
  
imports: import numpy
  import torch
  import torch.nn.functional
  from scipy import sparse
  from torch import nn
  from ..utils.constants import INF, VERY_SMALL_NUMBER
  from ..utils.generic_utils import normalize_adj, sparse_mx_to_torch_sparse_tensor
label_desc: Use image node_id 8 for calling the DynamicGraphConstructionBase obj's underlying member method code with example usage: obj._compute_distance_matrix(X, weight) and returns: dists