skada.deep.MCC

skada.deep.MCC(module, layer_name, reg=1, T=1, base_criterion=None, **kwargs)[source]
  1. See [33].

Parameters:
moduletorch module (class or instance)

A PyTorch Module.

layer_namestr

The name of the module's layer whose outputs are collected during the training for the adaptation.

regfloat, default=1

Regularization parameter for DA loss.

Tfloat, default=1

Temperature parameter for the scaling.

base_criteriontorch criterion (class)

The base criterion used to compute the loss with source labels. If None, the default is torch.nn.CrossEntropyLoss.

References

[33]

Ying Jin, Ximei Wang, Mingsheng Long, Jianmin Wang. Minimum Class Confusion for Versatile Domain Adaptation. In ECCV, 2020.