histogram#
- class deepinv.physics.functional.histogram(x: Tensor, bins: int = 10, low: float | None = None, upp: float | None = None, **kwargs)[source]#
Bases:
Computes the histogram of a tensor.
This is a torch implementation of numpy.histogram.
- Parameters:
x (torch.Tensor) – A tensor,
(*,)
.bins (int) – The number of bins.
low (float) – The lower bound. If low is
None
the min of x is used instead.upp (float) – The upper bound. If upp is
None
the max of x is used instead.kwargs – Keyword arguments passed to histogramdd.
- Return torch.Tensor:
The histogram