zyong812 / VS3_CVPR23

Code for CVPR23 paper: Learning to Generate Language-supervised and Open-vocabulary Scene Graph using Pre-trained Visual-Semantic Space
Apache License 2.0
35 stars 4 forks source link

miss the keys 'embedded', 'hidden' and 'masks' in language_dict_features #5

Closed JeffreyYzh closed 1 year ago

JeffreyYzh commented 1 year ago

When I follow your instructions and train fully supervised SGG , I get the feedback below. As I am newbie, could you please tell me how to fix it?Thank you!

Traceback (most recent call last): File "/data/yzh/code/VS3_CVPR23/tools/train_net.py", line 258, in main() File "/data/yzh/code/VS3_CVPR23/tools/train_net.py", line 252, in main model = train(cfg=cfg, File "/data/yzh/code/VS3_CVPR23/tools/train_net.py", line 130, in train do_train( File "/data/yzh/code/VS3_CVPR23/maskrcnn_benchmark/engine/trainer.py", line 122, in do_train loss_dict = model(images, targets, captions, positive_map, greenlight_map = greenlight_map) File "/home/yzh/anaconda3/envs/vss/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl return forward_call(*input, *kwargs) File "/data/yzh/codeI/VS3_CVPR23/maskrcnn_benchmark/modeling/detector/generalized_vl_rcnn.py", line 292, in forward proposals, proposal_losses, fused_visual_features = self.rpn(images, visual_features, targets, language_dict_features, positive_map, File "/home/yzh/anaconda3/envs/vss/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl return forward_call(input, **kwargs) File "/data/yzh/code/VS3_CVPR23/maskrcnn_benchmark/modeling/rpn/vldyhead.py", line 924, in forward embedding = language_dict_features['embedded'] File "/home/yzh/anaconda3/envs/vss/lib/python3.8/site-packages/transformers/utils/generic.py", line 384, in getitem return inner_dict[k] KeyError: 'embedded'