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

Problems when testing. #19

Open
eesaeedkarimi opened this issue Oct 18, 2020 · 4 comments
Open

Problems when testing. #19

eesaeedkarimi opened this issue Oct 18, 2020 · 4 comments

Comments

@eesaeedkarimi
Copy link

When I run test.py and change isOnline to False the following error occurs:

File "/media/saeed/New Volume/PAD/Codes/FAS-SGTD/fas_sgtd_multi_frame/test.py", line 284, in
offline_eval()
File "/media/saeed/New Volume/PAD/Codes/FAS-SGTD/fas_sgtd_multi_frame/test.py", line 275, in offline_eval
officialEval(os.path.join(flags.path.model, 'model.ckpt-%d'%(iter_now)))
File "/media/saeed/New Volume/PAD/Codes/FAS-SGTD/fas_sgtd_multi_frame/test.py", line 205, in officialEval
officialEvalSub(path_txt_dev, [flags.path.dev_file], 'dev', path_model_now)
File "/media/saeed/New Volume/PAD/Codes/FAS-SGTD/fas_sgtd_multi_frame/test.py", line 195, in officialEvalSub
fid.write(video_name_encode + ',' + str(video_score_mean) + '\n')
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'

Process finished with exit code 1

Please help to fix it. Thanks.

@eesaeedkarimi
Copy link
Author

When I run test.py and change isOnline to False the following error occurs:

File "/media/saeed/New Volume/PAD/Codes/FAS-SGTD/fas_sgtd_multi_frame/test.py", line 284, in
offline_eval()
File "/media/saeed/New Volume/PAD/Codes/FAS-SGTD/fas_sgtd_multi_frame/test.py", line 275, in offline_eval
officialEval(os.path.join(flags.path.model, 'model.ckpt-%d'%(iter_now)))
File "/media/saeed/New Volume/PAD/Codes/FAS-SGTD/fas_sgtd_multi_frame/test.py", line 205, in officialEval
officialEvalSub(path_txt_dev, [flags.path.dev_file], 'dev', path_model_now)
File "/media/saeed/New Volume/PAD/Codes/FAS-SGTD/fas_sgtd_multi_frame/test.py", line 195, in officialEvalSub
fid.write(video_name_encode + ',' + str(video_score_mean) + '\n')
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'

Process finished with exit code 1

Please help to fix it. Thanks.

The main problem is that the for loop in this line would not be executed.

Thanks for your help in advance.

@clks-wzz
Copy link
Owner

Maybe the dataset is not correctly written, so that the length of dataloader(test_input_fn) is zero. Please check it.

@punitha-valli
Copy link

@clks-wzz @eesaeedkarimi @clks-wzz
Hi,

I would like to know about the test score, in the util_test_OULU_Protocol_1.py

the Testscor.txt, file

can you please tell me about that text file? how to generate those text files.

it will be a great help for my studies

hope for a reply

thank you

@saisugash-senthil
Copy link

saisugash-senthil commented Mar 29, 2024

The for loop isn't getting executed because the features generator seems to be empty (it's length, when converted to a list, is 0). The reason for this could be:

features=mnist_classifier.predict( input_fn=eval_input_fn, checkpoint_path= path_model_now )

path_model_now is equal to './model_save/model.ckpt-19501' (I found this out by printing out the path while debugging), and no checkpoint file exists with such a name in the models being provided in this repo.
These are the only files that have been provided:
image

It would be helpful if the owners could clarify this.

P.S: I tried changing the names of a few files, but that isn't working.

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