histogram#
- class diffsptk.Histogram(n_bin=10, lower_bound=0, upper_bound=1, norm=False, softness=0.001)[source]#
 See this page for details.
- Parameters:
 - n_binint >= 1
 Number of bins, \(K\).
- lower_boundfloat < U
 Lower bound of the histogram, \(L\).
- upper_boundfloat > L
 Upper bound of the histogram, \(U\).
- normbool
 If True, normalize the histogram.
- softnessfloat > 0
 A smoothing parameter. The smaller value makes the output closer to the true histogram, but the gradient vanishes.
References
[1]M. Avi-Aharon et al., “DeepHist: Differentiable joint and color histogram layers for image-to-image translation,” arXiv preprint arXiv:2005.03995, 2020.
- diffsptk.functional.histogram(x, n_bin=10, lower_bound=0, upper_bound=1, norm=False, softness=0.001)[source]#
 Compute histogram.
- Parameters:
 - xTensor [shape=(…, T)]
 Input data.
- n_binint >= 1
 Number of bins, \(K\).
- lower_boundfloat < U
 Lower bound of the histogram, \(L\).
- upper_boundfloat > L
 Upper bound of the histogram, \(U\).
- normbool
 If True, normalize the histogram.
- softnessfloat > 0
 A smoothing parameter. The smaller value makes the output closer to the true histogram, but the gradient vanishes.
- Returns:
 - outTensor [shape=(…, K)]
 Histogram in [L, U].
See also