scwangdyd / zero_shot_hoi

Discovering human interaction with novel objects via zero-shot learning, CVPR, 2020
MIT License
41 stars 6 forks source link

AttributeError: 'Tensor' object has no attribute 'tensor' #2

Closed youjiangxu closed 4 years ago

youjiangxu commented 4 years ago

Hello,

  I ran the demo code :

python demo.py --config-file ./configs/HICO-DET/interaction_R_50_FPN.yaml --input ./demo/HICO_test2015_00003124.jpg --opts MODEL.WEIGHTS ./output/hico_det_pretrained.pkl but got an error: ./zero_shot_hoi/lib/modeling/horpn_outputs.py", line 650, in predict_proposals B = anchors_i[0].tensor.size(1) AttributeError: 'Tensor' object has no attribute 'tensor' do you know why this happens??

scwangdyd commented 4 years ago

Detectron2 updated their "anchor_generator" a few days ago, which returns the generated anchors in a different format. As I didn't update my part, the mismatched data format causes this bug. Now I add the old anchor_generator. This bug should be fixed.