fengyang0317 / unsupervised_captioning

Code for Unsupervised Image Captioning
MIT License
215 stars 51 forks source link

Chinese image caption, In the result, multiple words of the same type appear #21

Closed cylvzj closed 4 years ago

cylvzj commented 4 years ago

Hello, I am using the COCO dataset, A two-layer LSTM model, one layer for top-down attention, and one layer for language models.

Extracting words with jieba I used all the words in the picture description that occurred more than 3 times as a dictionary file, and a total of 14,226 words. words = [w for w in word_freq.keys () if word_freq [w]> 3]

After training the model, when using it, multiple words of the same type appear in the result, such as:

Note notebook laptop computer on bed A little girl little girl girl standing together

How can I solve this problem?

fengyang0317 commented 4 years ago

You may try to reduce the weight of the concept reward.

cylvzj commented 4 years ago

Thank you for your reply. Can you tell me how “the weight of the concept reward” is set in your project, in which file and where?

fengyang0317 commented 4 years ago

https://github.com/fengyang0317/unsupervised_captioning/blob/master/im_caption_full.py#L77

cylvzj commented 4 years ago

Thank you for your reply.