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

The code runs with unseen class accuracy 0.00 for all epochs. #3

Open
GayatriPurandharT opened this issue Sep 23, 2019 · 8 comments
Open

Comments

@GayatriPurandharT
Copy link

while training the model, I get unseen class accuracy of 0.00 right from the first epoch until the end. Though loss values are reducing from 6 to 3 (approx). There is no change in training accuracy. what could be the reason?
Thanks

@naraysa
Copy link
Owner

naraysa commented Sep 25, 2019

We haven't come across such an issue. The code has been tested and verified on Pytorch 0.3.1.

@GayatriPurandharT
Copy link
Author

Okay, I will recheck my environment. Thanks!

@GayatriPurandharT
Copy link
Author

I am using Python3 and PyTorch 0.3.1.
upon running ./run_hmdb51.sh I get unseen class accuracy = 0.0
as you can see from the screenshot attached.
Thanks a lot.
Screenshot from 2019-09-26 18-13-51

@naraysa
Copy link
Owner

naraysa commented Sep 28, 2019

Unfortunately, this issue isn't reproducible in our systems. It runs fine for the default repo on both HMDB51 and UCF101.

@GayatriPurandharT
Copy link
Author

Another concern is the negative values in both (Loss_G and Loss_D) loss function. Can you provide a log of loss functions for reference? I tried to run f-CLSWGAN code for image classification, and I get a negative Discriminator loss there too, what could be the reason?

@qc98
Copy link

qc98 commented Dec 24, 2019

I am using Python3 and PyTorch 0.3.1.
upon running ./run_hmdb51.sh I get unseen class accuracy = 0.0
as you can see from the screenshot attached.
Thanks a lot.
Screenshot from 2019-09-26 18-13-51

Actually, I got the same result as you. Could you tell me how you solve the problem?

@BestJuly
Copy link

BestJuly commented Jan 29, 2020

Same here.

I fix some error caused by pytorch version mismatch and run GZSL-OD. For seen and unseen classes, the accuracies are all 0.

My versions:
pytorch 1.3.1,
python 3.7,
GZSL-OD code is the same in ./run_ucf101.sh

[45/50] Loss_D: -3.1570 Loss_G: -2.3654, Wasserstein_dist: 3.1787
GZSL-OD: Acc seen=0.0000, Acc unseen=0.0000, h=0.0000
[46/50] Loss_D: -3.1612 Loss_G: -2.3816, Wasserstein_dist: 3.6776
GZSL-OD: Acc seen=0.0000, Acc unseen=0.0000, h=0.0000
[47/50] Loss_D: -3.1554 Loss_G: -2.4158, Wasserstein_dist: 3.3277
GZSL-OD: Acc seen=0.0000, Acc unseen=0.0000, h=0.0000
[48/50] Loss_D: -3.1469 Loss_G: -2.4038, Wasserstein_dist: 3.8994
GZSL-OD: Acc seen=0.0000, Acc unseen=0.0000, h=0.0000
[49/50] Loss_D: -3.1446 Loss_G: -2.4077, Wasserstein_dist: 3.4800
GZSL-OD: Acc seen=0.0000, Acc unseen=0.0000, h=0.0000

@TaeSoo-Kim
Copy link

In classifier_entropy.py, I change the line:
acc_per_class /= target_classes.size(0)
to the following:
acc_per_class = acc_per_class / float( target_classes.size(0))

I observed 0 accuracies as well before this fix.

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

5 participants