class_docstr: Creates a continuous Bernoulli distribution parameterized by :attr:`probs`
  or :attr:`logits` (but not both).
  
  The distribution is supported in [0, 1] and parameterized by 'probs' (in
  (0,1)) or 'logits' (real-valued). Note that, unlike the Bernoulli, 'probs'
  does not correspond to a probability and 'logits' does not correspond to
  log-odds, but the same names are used due to the similarity with the
  Bernoulli. See [1] for more details.
  
  Example::
  
      >>> # xdoctest: +IGNORE_WANT("non-deterministic")
      >>> m = ContinuousBernoulli(torch.tensor([0.3]))
      >>> m.sample()
      tensor([ 0.2538])
  
  Args:
      probs (Number, Tensor): (0,1) valued parameters
      logits (Number, Tensor): real valued parameters whose sigmoid matches 'probs'
  
  [1] The continuous Bernoulli: fixing a pervasive error in variational
  autoencoders, Loaiza-Ganem G and Cunningham JP, NeurIPS 2019.
  https://arxiv.org/abs/1907.06845
docstr: computes the log normalizing constant as a function of the natural parameter
docstr_tok: ["computes","the","log","normalizing","constant","as","a","function","of","the","natural","parameter"]
code: def _log_normalizer(self, x):
      """computes the log normalizing constant as a function of the natural parameter"""
      out_unst_reg = torch.max(
          torch.le(x, self._lims[0] - 0.5),
          torch.gt(x, self._lims[1] - 0.5),
      )
      cut_nat_params = torch.where(
          out_unst_reg, x, (self._lims[0] - 0.5) * torch.ones_like(x)
      )
      log_norm = torch.log(
          torch.abs(torch.exp(cut_nat_params) - 1.0)
      ) - torch.log(torch.abs(cut_nat_params))
      taylor = (
          0.5 * x + torch.pow(x, 2) / 24.0 - torch.pow(x, 4) / 2880.0
      )
      return torch.where(out_unst_reg, log_norm, taylor)
  
imports: import math
  from numbers import Number
  import torch
  from torch.distributions import constraints
  from torch.distributions.exp_family import ExponentialFamily
  from torch.distributions.utils import broadcast_all, clamp_probs, lazy_property, logits_to_probs, probs_to_logits
  from torch.nn.functional import binary_cross_entropy_with_logits
label_desc: Use image node_id 20 for calling the ContinuousBernoulli obj's underlying member method code with example usage: obj._log_normalizer(x) and returns: torch