原文:
https://github.com/DeepRNN/image_captioning/issues/27
遞歸點擊鏈接:
https://docs.python.org/2.5/whatsnew/pep-328.html
解決方法:
Update: I solve this issue by using relative import. Namely, e.g. change
譯:Update:我使用相對導入解決了這個問題。也就是說,例如改變
from tokenizer.ptbtokenizer import PTBTokenizer
to
from .tokenizer.ptbtokenizer import PTBTokenizer
I am thinking this results from different python versions (I am using python 3.6 while coco-caption metrics is for 2.7). Another solution is use the coco-caption metrics for python3.
譯:我認為這是不同python版本的結果(我使用的是python 3.6,而coco caption metrics是針對2.7的)。另一個解決方案是使用python3的coco字幕指標。