karpathy / neuraltalk2

Efficient Image Captioning code in Torch, runs on GPU
5.51k stars 1.26k forks source link

AssertionError: error: some caption had no words? #204

Open j2233ack opened 5 years ago

j2233ack commented 5 years ago

Hi Andevani, It's me again. I use my corpus to make prepro.py build json and h5 files.

But this happens Inserting the special UNK token Assigned 10000 to val, 10000 to test. Traceback (most recent call last): File "prepro_utf8.py", line 240, in Main(params) File "prepro_utf8.py", line 173, in main L, label_start_ix, label_end_ix, label_length = encode_captions(imgs, params, wtoi) File "prepro_utf8.py", line 150, in encode_captions Assert np.all(label_length > 0), 'error: some caption had no words?' AssertionError: error: some caption had no words?

Can you help me with my doubts?

Thank you very much.