Zero#
- class torch_uncertainty.methods.Zero(core_model, num_tta, filter_views=0.1, eps=1e-08)[source]#
Zero for test-time adaptation.
Zero performs “0-temperature averaging” (i.e. majority voting) at evaluation. It starts by filtering the
filter_viewsmost confident predictions, and returns the majority vote as a prediction. If used during training, the predictions will be those of the inner-model passed as argument (model).- Parameters:
core_model (
Module) – The inner model to train.num_tta (
int) – The number of views at evaluation time.filter_views (
float) – Filter out 1-filter_viewsof the predictions of the augmented views. Defaults to0.1.eps (
float) – For computational stability. Defaults to1e-8.