diff --git a/README.md b/README.md index 236dae5..e4e9057 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,7 @@ python eval_retrieval.py --bert_model bert-base-uncased --from_pretrained save/R 2: To test on held out validation split, use the following command: ``` - +python eval_tasks.py --bert_model bert-base-uncased --from_pretrained save/VQA_bert_base_6layer_6conect-pretrained/pytorch_model_19.bin --config_file config/bert_base_6layer_6conect.json --task 0 --split minval ``` ### VCR @@ -81,13 +81,13 @@ python eval_retrieval.py --bert_model bert-base-uncased --from_pretrained save/R 2: To test on VCR Q->A ``` - +python eval_tasks.py --bert_model bert-base-uncased --from_pretrained save/VCR_Q-A-VCR_QA-R_bert_base_6layer_6conect-pretrained/pytorch_model_19.bin --config_file config/bert_base_6layer_6conect.json --task 1 --split val ``` 3: To test on VCR QA->R ``` - +python eval_tasks.py --bert_model bert-base-uncased --from_pretrained save/VCR_Q-A-VCR_QA-R_bert_base_6layer_6conect-pretrained/pytorch_model_19.bin --config_file config/bert_base_6layer_6conect.json --task 2 --split val ``` ### RefCOCO+ diff --git a/vilbert/datasets/vcr_dataset.py b/vilbert/datasets/vcr_dataset.py index 0c7dfb4..9b62232 100644 --- a/vilbert/datasets/vcr_dataset.py +++ b/vilbert/datasets/vcr_dataset.py @@ -122,6 +122,9 @@ def __init__( if row[1] != 'name': self._names.append(row[1]) + if not os.path.exists(os.path.join(dataroot, "cache")): + os.makedirs(os.path.join(dataroot, "cache")) + # cache file path data/cache/train_ques cache_path = "data/VCR/cache/" + split + '_' + task + "_" + str(max_seq_length) + "_" + str(max_region_num) + "_vcr.pkl" if not os.path.exists(cache_path):