apple2373 / chainer-caption

image caption generation using chainer!
64 stars 27 forks source link

Problem in chainer-caption #2

Closed j2233ack closed 7 years ago

j2233ack commented 7 years ago

I have installed all the dependencies correctly. I tried reinstalling it both form pip and source code. I tried editing the source code too.

Traceback (most recent call last): File "sample_code_beam.py", line 44, in first_word= args.lang, File "./code/CaptionGenerator.py", line 43, in init self.index2token=self.parse_dic(dictonary_place) File "./code/CaptionGenerator.py", line 69, in parse_dic if isinstance(json_file['words'], list): KeyError: 'words'

apple2373 commented 7 years ago

Which language did you use for caption? I think you are using non-English language. If it is English, it should work.

Anyway, I fixed the bug. It should work with non-english language now.

j2233ack commented 7 years ago

I just ran to "I just want to generate caption!"

apple2373 commented 7 years ago

I see. All four commands shown in that section should work now.