probly.utils.torch¶
Utility functions for PyTorch models.
Functions¶
Intersection probability of a probability interval, per [WCM+24] Section 3.4. |
|
Compute the softmax of logits with temperature scaling applied. |
|
Collect outputs and targets from a model for a given data loader. |
|
Shannon entropy H(p) computed in torch along the last dim; 0*log(0) treated as 0. |
|
Reset all parameters of a torch module. |