a-PyTorch-Tutorial-to-Image-Captioning icon indicating copy to clipboard operation
a-PyTorch-Tutorial-to-Image-Captioning copied to clipboard

eval.py script is not working

Open LealemTilahun opened this issue 4 years ago • 6 comments

Hi @sgrvinod, i tried to run eval.py but "ValueError: max() arg is an empty sequence" error msg is displaying. how can i fix this error please!

LealemTilahun avatar Jul 02 '21 07:07 LealemTilahun

You can set beam_size at a big num,maybe it will work.

And once I have meet this problem,can not evaluate it at beam_size=5,after I train an other model at same parameters,it is work!

xieanheng avatar Sep 30 '21 09:09 xieanheng

A bigger beam size yields another problem. What if you have trained a model in the same parameters, but with a different dataset?

aliciaviernes avatar Jan 31 '22 10:01 aliciaviernes

Was the ValueError issue resolved? If yes, then how?

Thanks.

jainnipun11 avatar Apr 28 '22 09:04 jainnipun11

Hello! I met the same issue.How did you fixed it? please help~ Thank you very much!

Lydia-727 avatar May 17 '22 06:05 Lydia-727

Hello! Make sure you are assigning the latest .json file generated to the data folder. If that doesn't work, try adding "img_as_float" while reading the images in preprocessing and "img_as_ubyte" while resizing. Run create_input_files.py. Replace the files generated in the output folder to the ones already present in data folder and train again. This should solve the issue. Thanks!

jainnipun11 avatar May 17 '22 07:05 jainnipun11

Hello! Make sure you are assigning the latest .json file generated to the data folder. If that doesn't work, try adding "img_as_float" while reading the images in preprocessing and "img_as_ubyte" while resizing. Run create_input_files.py. Replace the files generated in the output folder to the ones already present in data folder and train again. This should solve the issue. Thanks!

Thanks for your reply. Actually,I tried to set beam_size=3,and it works. I will try your solution later.Thanks!

Lydia-727 avatar May 17 '22 09:05 Lydia-727