Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Imae Captioning Pickle Error #65

Closed
ahkarami opened this issue Sep 23, 2017 · 2 comments
Closed

Imae Captioning Pickle Error #65

ahkarami opened this issue Sep 23, 2017 · 2 comments

Comments

@ahkarami
Copy link

Hi,
I want to use the pre-trained models (without download MS-COCO Dataset). when i run the
python2 sample.py --image='png/example.png'
I got this error:

Traceback (most recent call last):
  File "sample.py", line 97, in <module>
    main(args)
  File "sample.py", line 37, in main
    vocab = pickle.load(f)
  File "/home/karami/anaconda2/lib/python2.7/pickle.py", line 1384, in load
    return Unpickler(file).load()
  File "/home/karami/anaconda2/lib/python2.7/pickle.py", line 864, in load
    dispatch[key](self)
  File "/home/karami/anaconda2/lib/python2.7/pickle.py", line 1096, in load_global
    klass = self.find_class(module, name)
  File "/home/karami/anaconda2/lib/python2.7/pickle.py", line 1132, in find_class
    klass = getattr(mod, name)
AttributeError: 'module' object has no attribute 'Vocabulary'

@yunjey
Copy link
Owner

yunjey commented Sep 28, 2017

@ahkarami You should save the vocabulary file to './data/vocab.pkl`. If you want to use the pretrained model, download the vocab file and unpack it as mentioned in ReadME.md.

@ahkarami
Copy link
Author

@yunjey Thank you for your response. The code works correctly.

@yunjey yunjey closed this as completed Sep 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants