ImageCaptioning.pytorch: some code missing?

python scripts/prepro_labels.py --input_json .../dataset_coco.json --output_json data/cocotalk.json --output_h5 data/cocotalk failed. Here are the errors:

Traceback (most recent call last):
  File "scripts/prepro_labels.py", line 192, in <module>
    main(params)
  File "scripts/prepro_labels.py", line 138, in main
    imgs = imgs['images']
TypeError: list indices must be integers, not str

It seems that some code is missing.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 37 (19 by maintainers)

Most upvoted comments

Att_feats are changing over locations, hidden states are changing over time. And the output of the attention module is a weighted summation of att_feats