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:
objectSupervised / 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
activationadv_lambdaadversarialbatchnormdropoutfrom_muhead_typehidden_dimsignore_indexlayernormloss_weightpos_weightwarmupnamen_classes