torchcell.losses.distributional.make_dist_head
- make_dist_head(dist: str, num_quantiles: int = 19, num_features: int | None = None, rank: int = 32, num_samples: int = 128) DistHead[source]
Build a
DistHeadfrom a configdistvalue.- Parameters:
dist – One of
point/crps/quantile/laplace_crps/nll/energy(the keys ofDIST_TO_MODE).num_quantiles –
quantileonly – size of thetaugrid.num_features –
energyonly –F; REQUIRED there to allocateV [F, rank].rank –
energyonly –k(0= the diagonal-only ablation).num_samples –
energyonly –mpredictive samples per score.
- Returns:
The configured head.