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

Validation Error? #24

Closed
ZYJ-JMF opened this issue Oct 4, 2021 · 8 comments
Closed

Validation Error? #24

ZYJ-JMF opened this issue Oct 4, 2021 · 8 comments

Comments

@ZYJ-JMF
Copy link

ZYJ-JMF commented Oct 4, 2021

Hi,sorry to bother you
But I use the validation coda to validate my training model
"python main.py --gpu 3 --validation --load_model GAN_20210928-031155 --dataset animal_faces --data_path 'data'"
but it get totally error result.

It gather the all 50 val dataset to one class
I draw the TSNE,it seems like that
微信图片_20211004165459
and print " (i, len(cluster_grid[i]), cluster_map[i]) " it shows that:
0 0 0
1 500 0
2 0 0
3 0 0
4 0 0
5 0 0
6 0 0
7 0 0
8 0 0
9 0 0

and the results are nothing changed.
Do you know the reason?

微信图片_20211004165607

@FriedRonaldo
Copy link
Collaborator

FriedRonaldo commented Oct 4, 2021

Hi,

The clustering might fail to be trained.

I have some questions to help you.

  1. Did you use animal_faces 10 dataset?
  2. Did you properly set the number of clusters?
  3. Did you try the pre-trained ".ckpt" file provided here ?
  4. Did you check the accuracy? (for animal_faces10 and food-10, the accuracy of the clustering will be printed at the end of every epoch)

EDIT

For validation set, the source code generates the validation set automatically (last 50 images in each class. So, you should not separate the validation set and the training set for food and animal)

The fild system must be like:
n1012123 (I do not remember the exact name of directory but use 1012123 temporarily)
|--- image1.jpg
|--- image2.jpg
...
|--- image700.jpg

Then, image651~image700 will be the validation set.

@ZYJ-JMF
Copy link
Author

ZYJ-JMF commented Oct 4, 2021

Hi,
1.I used the animal faces train all dataset with total 149 subjects?I got it from the link.Is that the animal_faces 10 dataset?
2.I set the output_k to 10
3. I am downloading the pre trained model.When I finish check I will update~

@FriedRonaldo
Copy link
Collaborator

Thank you for the check. I think that the issue might be from the improper directory. (Explanation in EDIT)

@ZYJ-JMF
Copy link
Author

ZYJ-JMF commented Oct 4, 2021

oh!I checked the pre-trained animalFaces10_0_00 model.
It gets reasonable result.
So I think maybe I use the wrong dataset.
Can you share the specific animal_faces 10 dataset? I think maybe it should like the food-10 with 10 folder.But now I got 149 folders so it can not cluster well?

@FriedRonaldo
Copy link
Collaborator

The source code automatically finds the 10 folders.. Hmm I will reply after my personal work.
The dataset is not ours so I cannot share it.

@ZYJ-JMF
Copy link
Author

ZYJ-JMF commented Oct 4, 2021

I got the idea~you picked the 10 folders use this code
if args.dataset == 'animal_faces':
args.att_to_use = [11, 43, 56, 74, 89, 128, 130, 138, 140, 141]

I wonder that if the specific folder different makes the final result wrong? it is strange.
I will check the code again~
Thanks for your resonse~

@FriedRonaldo
Copy link
Collaborator

FriedRonaldo commented Oct 4, 2021

Different classes choice does not make all the results wrong... Did you check the accuracy of your model while training?

The clustering seems to fail. But without any changes then why..?

@ZYJ-JMF
Copy link
Author

ZYJ-JMF commented Oct 5, 2021

Sorry,I find the error.
I changed the code and make the cal loss useless.
So it can not cluster correctly.
Your code is right.
Thanks for your patient~

@ZYJ-JMF ZYJ-JMF closed this as completed Oct 5, 2021
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