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"]
docstr: Inverse cdf of a tensor of quantile `quantiles`
  'quantiles' is of shape (*batch_shape) with values between (0.0, 1.0)
docstr_tok: ["Inverse","cdf","of","a","tensor","of","quantile","`","quantiles","`","'quantiles","'","is","of","shape","(","*","batch_shape",")","with","values","between","(","0.0",",","1.0",")"]
code: def _icdf_binned(self, quantiles):
      """
      Inverse cdf of a tensor of quantile `quantiles`
      'quantiles' is of shape (*batch_shape) with values between (0.0, 1.0)
      """
      quantiles = quantiles.unsqueeze(dim=-1)
      # quantiles.shape: (*batch_shape, 1)
  
      batch_shape_extended = quantiles.shape
  
      bins_prob = self.bins_prob
  
      # For each bin we get the cdf up to the bin (lower) and the cdf
      # including the bin (upper)
      incomplete_cdf_upper = bins_prob.cumsum(dim=-1)
      # incomplete_cdf_upper.shape: (*batch_shape, numb_bins)
      incomplete_cdf_lower = torch.zeros_like(incomplete_cdf_upper)
      incomplete_cdf_lower[..., 1:] = incomplete_cdf_upper[..., :-1]
      # incomplete_cdf_lower.shape: (*batch_shape, numb_bins)
  
      one_hot_bin_indicator = (incomplete_cdf_lower <= quantiles) * (
          quantiles < incomplete_cdf_upper
      )
      # one_hot_bin_indicator.shape: (*batch_shape, numb_bins)
      # Handling the quantile equal to 1.0
      higher_than_last = (
          quantiles[..., 0] >= incomplete_cdf_upper[..., -1]
      )
      one_hot_bin_indicator[..., -1][higher_than_last] = True
  
      upper_edges = self.bin_edges[1:].unsqueeze(dim=0)
      # upper_edges.shape: (1, numb_bins)
      upper_edges = upper_edges.repeat(batch_shape_extended)
      # upper_edges.shape: (*batch_shape, numb_bins)
      lower_edges = self.bin_edges[:-1].unsqueeze(dim=0)
      # lower_edges.shape: (1, numb_bins)
      lower_edges = lower_edges.repeat(batch_shape_extended)
      # lower_edges.shape: (*batch_shape, numb_bins)
  
      bin_width = upper_edges[one_hot_bin_indicator].view(
          batch_shape_extended
      ) - lower_edges[one_hot_bin_indicator].view(batch_shape_extended)
      # bin_width.shape: (*batch_shape)
  
      prob_bin = bins_prob[one_hot_bin_indicator].view(
          batch_shape_extended
      )
      # prob_bin.shape: (*batch_shape)
  
      prob_left = quantiles.view(
          batch_shape_extended
      ) - incomplete_cdf_lower[one_hot_bin_indicator].view(
          batch_shape_extended
      )
      # prob_left.shape: (*batch_shape)
      bin_lower_edge = lower_edges[one_hot_bin_indicator].view(
          batch_shape_extended
      )
      # bin_lower_edge.shape: (*batch_shape)
  
      result_icdf = bin_width * prob_left / prob_bin + bin_lower_edge
      return result_icdf.squeeze(dim=-1)
  
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 13 for calling the BinnedUniforms obj's underlying member method code with example usage: obj._icdf_binned(quantiles) and returns: result_icdf