pub fn bins_to_scalar(
logits: &Tensor,
min_val: f64,
max_val: f64,
) -> Result<Tensor>Expand description
Convert bin logits to a scalar via softmax + weighted average of bin centres.
logits — [..., n_bins]
min_val — value of the first bin centre
max_val — value of the last bin centre
Returns [...] with the same leading dims, values in [min_val, max_val].