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
net = ImageDepthNet(args)
net.cuda()
net.eval()
# load model (multi-gpu)
model_path = './checkpoint/RGB_VST_T.pth'
state_dict = torch.load(model_path)
from collections import OrderedDict
new_state_dict = OrderedDict()
for k, v in state_dict.items():
name = k[7:] # remove `module.`
new_state_dict[name] = v
# load params
net.load_state_dict(new_state_dict)
print('Model loaded from {}'.format(model_path))
你好,我在运行你的代码进行测试的过程中,在加载权重这步出现了问题。由于没有预训练权重,所以我把swin_transformer的pretrained参数改为false,其他超参数并无变化。在运行下面这段代码时出现报错:
出现报错如下
貌似是权重和模型不匹配,请问是我哪里改错了吗
The text was updated successfully, but these errors were encountered: