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

Got different results from inference.py and eval.py #29

Open
sylvialee12 opened this issue Apr 1, 2019 · 2 comments
Open

Got different results from inference.py and eval.py #29

sylvialee12 opened this issue Apr 1, 2019 · 2 comments

Comments

@sylvialee12
Copy link

Hello Antoine,

I've applied your code on my own datasets, but some strange things happened. Having input the same data and same model checkpoint, I got different results from eval.py and inference.py. Here's some examples:
From eval.py, numpy.argmax(predictions_val, axis=1) gives:
[17 18 17 18 17 17 17 17 8 17 17 17 0 18 18 17 17 0 17 17 0 17 17 17
17 17 10 17 19 17 17 17 19 10 17 17 17 9 17 7 17 17 17 17 9 17 17 17
10 10 10 0 17 17 17 8 17 17 0 17 17 17 17 17 17 17 17 17 12 17 17 17
17 17 14 17 17 10 17 0 17 16 17 17 17 17 9 0 17 17 17 17 17 17 17 0
17 0 17 17 17 17 17 17 17 0 1 3 5 17 17 9 17 17 10 17 17 17 17 9
17 17 17 10 17 17 17 17]
But from inference.py, numpy.argmax(predictions_val, axis=1) gives:
[11 8 4 18 6 10 10 6 10 0 10 8 0 18 8 10 10 0 10 8 0 8 10 18
8 8 10 10 19 17 18 10 19 10 10 14 9 10 10 8 0 10 10 11 10 3 11 9
10 10 10 0 18 8 10 8 10 0 0 10 7 10 8 0 9 0 10 10 6 10 10 3
10 0 10 6 11 10 10 0 10 10 1 9 0 11 4 3 0 6 0 17 6 17 10 18
7 0 6 7 0 7 10 0 10 0 1 0 16 6 0 9 10 5 10 7 0 11 10 0
0 6 10 10 1 0 6 3]

They are totally different, have you tried this as I did? Looking forward to your reply. Thanks in advance.

Sylvia

@sylvialee12
Copy link
Author

The hyperparameters for training are as the following:
--model=NetVLADModelLF --iterations=300 --frame_features=True --feature_names="rgb" --feature_sizes=1024 --netvlad_clusters=64 --netvlad_hidden_size=128 --moe_l2=1e-6 --learning_rate_decay=0.8 --netvlad_relu=False --gating=True --moe_prob_gating=True --max_steps=120000 --num_classes 20 --start_new_model=True --batch_size 128

@huitang
Copy link

huitang commented Feb 18, 2020

hihi may I ask did you freeze the pertained model before inference.py, or you directly use the the downloaded files
I did not find "checkpoint" file in the downloaded Zip, and maybe because of that I am not able to load the pertained model
If you frozen the model, do you mind to share the frozen code?
Many many thanks,

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