这里写自定义目录标题 Error(s) in loading state_dict for ResnetGenerator_depth: Error(s) in loading state_dict for ResnetGenerator_depth: 原始代码 checkpoint = torch.load(model) net.load_state_dict(checkpoint['net']) net.cuda() 更改为 checkpoint = torch.load(model) net.load_state_dict(checkpoint['net'], False) net.cuda()