class_docstr: Binned uniforms distribution.
  
  Args:
      bins_lower_bound (float): The lower bound of the bin edges
      bins_upper_bound (float): The upper bound of the bin edges
      numb_bins (int): The number of equidistance bins to allocate between
          `bins_lower_bound` and `bins_upper_bound`. Default value is 100.
      logits (tensor): the logits defining the probability of each bins.
          These are softmaxed. The tensor is of shape (*batch_shape,)
      validate_args (bool) from the pytorch Distribution class
class_docstr_tok: ["Binned","uniforms","distribution",".","Args",":","bins_lower_bound","(","float",")",":","The","lower","bound","of","the","bin","edges","bins_upper_bound","(","float",")",":","The","upper","bound","of","the","bin","edges","numb_bins","(","int",")",":","The","number","of","equidistance","bins","to","allocate","between","`","bins_lower_bound","`","and","`","bins_upper_bound","`",".","Default","value","is","100.","logits","(","tensor",")",":","the","logits","defining","the","probability","of","each","bins",".","These","are","softmaxed",".","The","tensor","is","of","shape","(","*","batch_shape",",",")","validate_args","(","bool",")","from","the","pytorch","Distribution","class"]
code: def __init__(
      self,
      bins_lower_bound: float,
      bins_upper_bound: float,
      logits: torch.Tensor,
      numb_bins: int = 100,
      validate_args: Optional[bool] = None,
  ):
      assert bins_lower_bound < bins_upper_bound, (
          f"bins_lower_bound {bins_lower_bound} needs to less than "
          f"bins_upper_bound {bins_upper_bound}"
      )
      assert (
          logits.shape[-1] == numb_bins
      ), "The distribution requires one logit per bin."
  
      self.logits = logits
      setattr(self, "logits", self.logits)
  
      device = logits.device
  
      super(BinnedUniforms, self).__init__(
          batch_shape=logits.shape[:-1],
          event_shape=logits.shape[-1:],
          validate_args=validate_args,
      )
  
      self.numb_bins = numb_bins
  
      # Creation the bin locations
      # Bins locations are placed uniformly between bins_lower_bound and
      # bins_upper_bound, though more complex methods could be used
      self.bin_min = bins_lower_bound
      self.bin_max = bins_upper_bound
  
      self.bin_edges = torch.linspace(
          self.bin_min, self.bin_max, self.numb_bins + 1
      )
      self.bin_widths = self.bin_edges[1:] - self.bin_edges[:-1]
      self.bin_centres = (
          self.bin_edges[1:] + self.bin_edges[:-1]
      ) * 0.5
  
      self.bin_edges = self.bin_edges.to(device)
      self.bin_widths = self.bin_widths.to(device)
      self.bin_centres = self.bin_centres.to(device)
  
imports: from typing import Dict, Optional, Tuple, cast
  import torch
  import torch.nn.functional
  from torch.distributions import Distribution, constraints
  from gluonts.core.component import validated
  from .distribution_output import DistributionOutput
label_desc: Use image node_id 1 to create a new BinnedUniforms object from inherited base classes: Distribution with example: obj = BinnedUniforms(bins_lower_bound, bins_upper_bound, logits, numb_bins, validate_args)