skada.deep.DAN

skada.deep.DAN(module, layer_name, reg=1, sigmas=None, base_criterion=None, **kwargs)[source]

DAN domain adaptation method.

See [14].

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.

sigmasarray-like, optional (default=None)

The sigmas for the Gaussian kernel.

base_criteriontorch criterion (class)

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

References

[14]

Mingsheng Long et. al. Learning Transferable Features with Deep Adaptation Networks. In ICML, 2015.