probly.train.evidential.torch.make_in_domain_target_alpha

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

Construct target Dirichlet distribution for in-distribution samples.

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).