-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
why is the following happening? RuntimeError: Error(s) in loading state_dict for GEN_VLKT: #13
Comments
It seems the checkpoint is incomplete or missing, could you provide more error logs? |
Thank you very much for your reply!In the visualization_hico.sh file, using the pretrained model parameters provided by --pretrained params/detr-r50-pre-2branch-hico.pth, the following error is always displayed, Looking forward to your reply. use clip text encoder to init classifier weight VISUALIZATION number of params: 42089226 |
Maybe you only load the pretrained DETR weights, not our HOICLIP weights. Do you set |
Loading checkpoint_default.pth still has the following error: |
Opps! I find a bug in visualization code. The visualization code actually visulize the results of GEN-VLKT. I fix the code in |
Traceback (most recent call last): |
Sorry for another bug. It should work with latest codes. |
Thanks to the author, hope to update the code. |
(hoiclip) ayushi@gpusrv002:/DATA/scene_graph/ayushi/HOICLIP$ python main.py --pretrained checkpoint_rf_uc.pth --dataset_file hico --hoi_path data/hico_20160224_det --num_obj_classes 80 --num_verb_classes 117 --backbone resnet50 --num_queries 64 --dec_layers 3 --eval --zero_shot_type default --with_clip_label --with_obj_clip_label --use_nms_filter Namespace(lr=0.0001, lr_backbone=1e-05, lr_clip=1e-05, batch_size=2, weight_decay=0.0001, epochs=150, lr_drop=100, clip_max_norm=0.1, eval_each=4, eval_each_lr_drop=2, frozen_weights=None, backbone='resnet50', dilation=False, position_embedding='sine', enc_layers=6, dec_layers=3, dim_feedforward=2048, hidden_dim=256, dropout=0.1, nheads=8, num_queries=64, pre_norm=False, masks=False, hoi=False, num_obj_classes=80, num_verb_classes=117, pretrained='checkpoint_rf_uc.pth', subject_category_id=0, verb_loss_type='focal', aux_loss=True, with_mimic=False, set_cost_class=1, set_cost_bbox=2.5, set_cost_giou=1, set_cost_obj_class=1, set_cost_verb_class=1, set_cost_hoi=1, mask_loss_coef=1, dice_loss_coef=1, bbox_loss_coef=2.5, giou_loss_coef=1, obj_loss_coef=1, verb_loss_coef=2, hoi_loss_coef=2, mimic_loss_coef=20, alpha=0.5, eos_coef=0.1, dataset_file='hico', coco_path=None, coco_panoptic_path=None, remove_difficult=False, hoi_path='data/hico_20160224_det', output_dir='', device='cuda', seed=42, resume='', start_epoch=0, eval=True, num_workers=2, world_size=1, dist_url='env://', use_nms_filter=True, thres_nms=0.7, nms_alpha=1, nms_beta=0.5, json_file='results.json', ft_clip_with_small_lr=False, with_clip_label=True, with_obj_clip_label=True, clip_model='ViT-B/32', fix_clip=False, clip_embed_dim=512, zero_shot_type='default', del_unseen=False, fix_backbone_mode=[], use_ddp=1, with_random_shuffle=2, gradient_accumulation_steps=1, opt_sched='multiStep', no_clip_cls_init=False, enable_amp=False, opt_level='O2', fix_clip_label=False, with_rec_loss=False, rec_loss_coef=2, no_training=False, dataset_root='GEN', model_name='GEN', eval_location=False, enable_cp=False, no_fix_clip_linear=False, analysis=False, alternative=1, eval_each_ap=False, topk_hoi=10, inter_dec_layers=3, verb_pth='', verb_weight=0.5, frac=-1.0, validation_split=-1.0, lr_drop_gamma=0.1, training_free_enhancement_path='', distributed=False) GEN number of params: 193327284 |
--zero_shot_type default mean you choose the model for default setting where there are 600 classes for prediction, however, you load a zero-shot setting model weight(checkpoint_rf_uc.pth), which cause the error |
Traceback (most recent call last):
File "main.py", line 597, in
main(args)
File "main.py", line 433, in main
model_without_ddp.load_state_dict(checkpoint['model'], strict=True)
File "C:\Users\wanni\anaconda3\envs\hoiclip\lib\site-packages\torch\nn\modules\module.py", line 2152, in load_state_dict
raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
RuntimeError: Error(s) in loading state_dict for GEN_VLKT:
The text was updated successfully, but these errors were encountered: