pytorch-adda
pytorch-adda copied to clipboard
accuracy just 13% after adaptation?
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?
Same here...did you upgrade to 0.4 ?
The model outputs a single class only
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...
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?
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
?
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?
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%
@xingkongliang How to find the path of transforms.py?Is it in anaconda3/lib/python3.6/site-packages/ ?But I don't find it.