You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
训练了20轮
整个函数是不是需要做修改
我改为如下
def resume_from_ckpt11(ckpt_path, model, optimizer=None, lr_scheduler=None):
ckpt = torch.load(ckpt_path)
if 'model' in ckpt.keys():
ckpt = ckpt['model']
count = 0
miss = []
for i in ckpt:
if 'backbone.swin' in i:
model.state_dict()[i].copy_(ckpt[i])
count += 1
elif 'roi_heads.reid_head.swin' in i:
model.state_dict()[i].copy_(ckpt[i])
count += 1
else:
miss.append(i)
print('%d loaded, %d missed:' %(count,len(miss)),miss)
return 0
不知道这么改对不对 或者应该怎么改
The text was updated successfully, but these errors were encountered:
感谢您提供重要的学习内容,有一个问题想请教,在cuhk_sysu做完训练后通过demo.py做推理的时候,结果不正确
训练了20轮
整个函数是不是需要做修改
我改为如下
def resume_from_ckpt11(ckpt_path, model, optimizer=None, lr_scheduler=None):
ckpt = torch.load(ckpt_path)
if 'model' in ckpt.keys():
ckpt = ckpt['model']
不知道这么改对不对 或者应该怎么改
The text was updated successfully, but these errors were encountered: