captionGen icon indicating copy to clipboard operation
captionGen copied to clipboard

ValueError: translation table must be 256 characters long

Open livc opened this issue 8 years ago • 1 comments

➜  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

livc avatar May 19 '17 03:05 livc

Hey, I'd like to work on this. Can you tell me where to begin?

saireddythfc avatar Aug 22 '21 20:08 saireddythfc