facebookresearch / clevr-dataset-gen

A Diagnostic Dataset for Compositional Language and Elementary Visual Reasoning
Other
590 stars 208 forks source link

No key 'function' in the list of questions #17

Closed RishikMani closed 5 years ago

RishikMani commented 5 years ago

I am referring to the repository CLEVR IEP for training model. I followed the steps as in the TRAINING.md file but unfortunately the script breaks. In the file programs.py inside functions function_to_str, list_to_tree, tree_to_prefix, tree_to_postfix all tries to access the key cur['function'], which does not exist in any of the questions generated.

Does someone have the updated code for clevr-dataset-gen for questions generation, and if not how this could be tackled?

RishikMani commented 5 years ago

I was able to resolve this issue by referring to one of the answers posted in another thread. Originally, the json file is generated with the key 'type' which actually needs to be changed to 'function'. Please follow this link for better understanding. fix_questions_issue