univi.ClassHeadConfig

univi.ClassHeadConfig#

class univi.ClassHeadConfig(name, n_classes, loss_weight=1.0, ignore_index=-1, from_mu=True, warmup=0, adversarial=False, adv_lambda=1.0, head_type=None, hidden_dims=None, dropout=None, batchnorm=None, activation=None, pos_weight=1.0, layernorm=False)[source]#

Bases: object

Supervised / adversarial head configuration.

Backwards compatible defaults preserve the old behavior: - head_type defaults to categorical (even if n_classes==2)

__init__(name, n_classes, loss_weight=1.0, ignore_index=-1, from_mu=True, warmup=0, adversarial=False, adv_lambda=1.0, head_type=None, hidden_dims=None, dropout=None, batchnorm=None, activation=None, pos_weight=1.0, layernorm=False)#

Methods

__init__(name, n_classes[, loss_weight, ...])

Attributes

activation

adv_lambda

adversarial

batchnorm

dropout

from_mu

head_type

hidden_dims

ignore_index

layernorm

loss_weight

pos_weight

warmup

name

n_classes