thuml / Transfer-Learning-Library

Transfer Learning Library for Domain Adaptation, Task Adaptation, and Domain Generalization
http://transfer.thuml.ai
MIT License
3.39k stars 553 forks source link

It seems some problems in the implementation of JMMD (Deep Transfer Learning with Joint Adaptation Networks) #158

Closed less-and-less-bugs closed 2 years ago

less-and-less-bugs commented 2 years ago

Hi, the jmmd loss will be negative given the existing implementation of JMMD in class JointMultipleKernelMaximumMeanDiscrepancy(nn.Module).

I think may be another approximation of JMMD should be better.

thucbx99 commented 2 years ago

This is reasonable because we use the empirical estimate of JMMD as in the original paper (Equ 9). It may be better to use other approximations, and I'm not particularly aware of improvements to this myself.

less-and-less-bugs commented 2 years ago

Thank you very much.