class_docstr: The Variational Graph Auto-Encoder model from the
  `"Variational Graph Auto-Encoders" <https://arxiv.org/abs/1611.07308>`_
  paper.
  
  Args:
      encoder (torch.nn.Module): The encoder module to compute :math:`\mu`
          and :math:`\log\sigma^2`.
      decoder (torch.nn.Module, optional): The decoder module. If set to
          :obj:`None`, will default to the
          :class:`torch_geometric.nn.models.InnerProductDecoder`.
          (default: :obj:`None`)
class_docstr_tok: ["The","Variational","Graph","Auto-Encoder","model","from","the","`","``","Variational","Graph","Auto-Encoders","''","<","https",":","\/\/arxiv.org\/abs\/1611.07308",">","`","_","paper",".","Args",":","encoder","(","torch.nn.Module",")",":","The","encoder","module","to","compute",":","math",":","`","\\mu","`","and",":","math",":","`","\\log\\sigma^2","`",".","decoder","(","torch.nn.Module",",","optional",")",":","The","decoder","module",".","If","set","to",":","obj",":","`","None","`",",","will","default","to","the",":","class",":","`","torch_geometric.nn.models.InnerProductDecoder","`",".","(","default",":",":","obj",":","`","None","`",")"]
docstr: Computes the KL loss, either for the passed arguments :obj:`mu`
  and :obj:`logstd`, or based on latent variables from last encoding.
  
  Args:
      mu (torch.Tensor, optional): The latent space for :math:`\mu`. If
          set to :obj:`None`, uses the last computation of :math:`\mu`.
          (default: :obj:`None`)
      logstd (torch.Tensor, optional): The latent space for
          :math:`\log\sigma`.  If set to :obj:`None`, uses the last
          computation of :math:`\log\sigma^2`. (default: :obj:`None`)
docstr_tok: ["Computes","the","KL","loss",",","either","for","the","passed","arguments",":","obj",":","`","mu","`","and",":","obj",":","`","logstd","`",",","or","based","on","latent","variables","from","last","encoding",".","Args",":","mu","(","torch.Tensor",",","optional",")",":","The","latent","space","for",":","math",":","`","\\mu","`",".","If","set","to",":","obj",":","`","None","`",",","uses","the","last","computation","of",":","math",":","`","\\mu","`",".","(","default",":",":","obj",":","`","None","`",")","logstd","(","torch.Tensor",",","optional",")",":","The","latent","space","for",":","math",":","`","\\log\\sigma","`",".","If","set","to",":","obj",":","`","None","`",",","uses","the","last","computation","of",":","math",":","`","\\log\\sigma^2","`",".","(","default",":",":","obj",":","`","None","`",")"]
code: def kl_loss(
      self, mu: Optional[Tensor] = None, logstd: Optional[Tensor] = None
  ) -> Tensor:
      r"""Computes the KL loss, either for the passed arguments :obj:`mu`
      and :obj:`logstd`, or based on latent variables from last encoding.
  
      Args:
          mu (torch.Tensor, optional): The latent space for :math:`\mu`. If
              set to :obj:`None`, uses the last computation of :math:`\mu`.
              (default: :obj:`None`)
          logstd (torch.Tensor, optional): The latent space for
              :math:`\log\sigma`.  If set to :obj:`None`, uses the last
              computation of :math:`\log\sigma^2`. (default: :obj:`None`)
      """
      mu = self.__mu__ if mu is None else mu
      logstd = (
          self.__logstd__
          if logstd is None
          else logstd.clamp(max=MAX_LOGSTD)
      )
      return -0.5 * torch.mean(
          torch.sum(1 + 2 * logstd - mu**2 - logstd.exp() ** 2, dim=1)
      )
  
imports: from typing import Optional, Tuple
  import torch
  from torch import Tensor
  from torch.nn import Module
  from torch_geometric.nn.inits import reset
  from torch_geometric.utils import negative_sampling
label_desc: Use image node_id 4 for calling the VGAE obj's underlying member method code with example usage: obj.kl_loss(mu, logstd) and returns: unknown