torch.histogram
torch.histogram(input, bins, *, range=None, weight=None, density=False, out=None)
Computes a histogram of the values in a tensor.
"bins" can be an integer or a 1D tensor.
If "bins" is an int, it specifies the number of equal-width bins.
   By default, the lower and upper range of the bins is determined by
   the minimum and maximum elements of the input tensor. The "range"
   argument can be provided to specify a range for the bins.
If "bins" is a 1D tensor, it specifies the sequence of bin edges
   including the rightmost edge. It should contain at least 2 elements
   and its elements should be increasing.
Parameters:
      * input (Tensor) -- the input tensor.
  * **bins** -- int or 1D Tensor. If int, defines the number of
    equal-width bins. If tensor, defines the sequence of bin edges
    including the rightmost edge.

Keyword Arguments:
      * range (tuple of python:float) -- Defines the range of
        the bins.