make_in_domain_target_alpha

probly.losses.torch.make_in_domain_target_alpha(y: Tensor) Tensor[source]

Construct in-domain Dirichlet targets based on [MG18].

Used by Dirichlet Prior Networks, Posterior Networks, and PN-style paired losses to create a sharp (peaked) Dirichlet target for supervised in-distribution training.

Parameters:

y – Ground-truth class labels, shape (B,).

Returns:

Target Dirichlet concentration parameters, shape (B, C).