captionGen
captionGen copied to clipboard
ValueError: translation table must be 256 characters long
➜ captionGen git:(master) ✗ python main.py
using pretrained cnn resnet50
Downloading: "https://s3.amazonaws.com/pytorch/models/resnet50-19c8e357.pth" to /Users/zhao/.torch/models/resnet50-19c8e357.pth
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 102502400/102502400 [02:10<00:00, 782741.06it/s]
loading annotations into memory...
Done (t=1.76s)
creating index...
index created!
Traceback (most recent call last):
File "main.py", line 185, in <module>
main()
File "main.py", line 89, in main
vocab = build_vocab()
File "/Users/zhao/Desktop/Dropbox/repo/captionGen/data.py", line 46, in build_vocab
captions = simple_tokenize([ann['caption'] for ann in anns])
File "/Users/zhao/Desktop/Dropbox/repo/captionGen/data.py", line 33, in simple_tokenize
string.punctuation).strip().split()
ValueError: translation table must be 256 characters long
Hey, I'd like to work on this. Can you tell me where to begin?