skada.deep.DeepCoral

skada.deep.DeepCoral(module, layer_name, reg=1, assume_centered=False, base_criterion=None, **kwargs)[source]

DeepCORAL domain adaptation method.

From [12].

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, optional (default=1)

Regularization parameter for DA loss.

assume_centered: bool, default=False

If True, data are not centered before computation.

base_criteriontorch criterion (class)

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

References

[12]

Baochen Sun and Kate Saenko. Deep coral: Correlation alignment for deep domain adaptation. In ECCV Workshops, 2016.

Examples using skada.deep.DeepCoral

Divergence domain adaptation methods.

Divergence domain adaptation methods.

Training setup for deep DA method.

Training setup for deep DA method.