Zero#

class torch_uncertainty.models.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_views most 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 (nn.Module) – The inner model to train.

  • num_tta (int) – The number of views at evaluation time.

  • filter_views (float) – Filter out 1-filter_views of the predictions of the augmented views. Defaults to 0.1.

  • eps (float) – for computational stability. Defaults to 1e-8;