Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add some labels from target domain hurts performance #17

Open
YiruS opened this issue Oct 16, 2020 · 3 comments
Open

Add some labels from target domain hurts performance #17

YiruS opened this issue Oct 16, 2020 · 3 comments

Comments

@YiruS
Copy link

YiruS commented Oct 16, 2020

Hi there,

First of all, nice work!

I'd like to add some labels from target domain for training (pick 100 shapes from target domain to assign the GT labels for training). However, it turns out the classification accuracy drops from ~64% to ~59%. Below is my code snippet:

        pred_s1, pred_s2 = model(data)
        pred_t1, pred_t2 = model(data_t, constant=cons, adaptation=True)

        # Classification loss

        loss_s1 = criterion(pred_s1, label)
        loss_s2 = criterion(pred_s2, label)
        loss_t1 = criterion(pred_t1, label_t)
        loss_t2 = criterion(pred_t2, label_t)

        # Adversarial loss

        loss_adv = - 1 * discrepancy(pred_t1, pred_t2)

        loss_s = loss_s1 + loss_s2 + loss_t1 + loss_t2
        loss = args.weight * loss_s + loss_adv

What I don't quite understand is that -- why the performance will drop after adding some real labels from target domain for training? Do you have any insights into this?

Much appreciate your comments!

Best,
Yiru

@canqin001
Copy link
Owner

Hi Yiru. I have not tested this yet. Did you try all the domain pairs or simply try one pair?

@YiruS
Copy link
Author

YiruS commented Oct 16, 2020 via email

@canqin001
Copy link
Owner

Hi Yiru. I don't see any bugs in your code. For the SDA setting, I guess the model might be overfitting towards the target domain if few labeled samples are provided. It is a very interesting problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants