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

accuracy just 13% after adaptation? #8

Open
dupanfei1 opened this issue Apr 26, 2018 · 8 comments
Open

accuracy just 13% after adaptation? #8

dupanfei1 opened this issue Apr 26, 2018 · 8 comments

Comments

@dupanfei1
Copy link

Thank you for you code!
I have run the code as the instruction, but just got 13% accuracy on target domain.
is there something wrong?

@IssamLaradji
Copy link

IssamLaradji commented Apr 26, 2018

Same here...did you upgrade to 0.4 ?

@IssamLaradji
Copy link

The model outputs a single class only

@IssamLaradji
Copy link

IssamLaradji commented Apr 27, 2018

I found the issue, if you downgrade torchvision to version 0.1.9 i.e. pip install torchvision==0.2.0 then you get the right results. it seems that torchvision 0.2.1 does not normalize the usps images...

@dupanfei1
Copy link
Author

thank you for you answer! my torchvision version is 0.2.1 pytorch is 0.2.0post3
And do you try another ADDA code? https://github.com/nitahhhh/adda-pytorch
I also got 15% accracy?

@IssamLaradji
Copy link

It worked with me when I installed torchvision 0.2.0 instead. You can do pip install torchvision==0.2.0
Did you try with torchvision 0.2.0 ?

@dupanfei1
Copy link
Author

I have tried torchvision==0.1.9 it did work for https://github.com/corenel/pytorch-adda. BUT it did not work for https://github.com/nitahhhh/adda-pytorch. I will try 0.2.0.
Is the version difference so big?

@xingkongliang
Copy link

xingkongliang commented Aug 5, 2018

In torchvision version 0.2.1. When you load data, tensor will subtract mean every time.
So I sovle this by adding torchvision/transforms/transforms.py 143 line:
tensor = tensor.clone() return F.normalize(tensor, self.mean, self.std)
=== Evaluating classifier for encoded target domain === source only <<< Avg Loss = 0.3259507119655609, Avg Accuracy = 96.236557% domain adaption <<< Avg Loss = 0.4486095607280731, Avg Accuracy = 96.397847%

@wgqtmac
Copy link

wgqtmac commented Oct 10, 2018

@xingkongliang How to find the path of transforms.py?Is it in anaconda3/lib/python3.6/site-packages/ ?But I don't find it.

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

4 participants