Closed FeiXie8 closed 2 years ago
self.net.load_state_dict(torch.load(weights_path, map_location=lambda storage, loc: storage))
the error is : RuntimeError: Error(s) in loading state_dict for SuperPointNet_VGG: Missing key(s) in state_dict: "inc.conv.conv.0.weight", "inc.conv.conv.0.bias", "inc.conv.conv.1.weight", "inc.conv.conv.1.bias", "inc.conv.conv.1.running_mean", "inc.conv.conv.1.running_var", "inc.conv.conv.3.weight", "inc.conv.conv.3.bias", "inc.conv.conv.4.weight", "inc.conv.conv.4.bias", "inc.conv.conv.4.running_mean", "inc.conv.conv.4.running_var", "down1.mpconv.1.conv.0.weight", "down1.mpconv.1.conv.0.bias", "down1.mpconv.1.conv.1.weight", "down1.mpconv.1.conv.1.bias", "down1.mpconv.1.conv.1.running_mean", "down1.mpconv.1.conv.1.running_var", "down1.mpconv.1.conv.3.weight", "down1.mpconv.1.conv.3.bias", "down1.mpconv.1.conv.4.weight", "down1.mpconv.1.conv.4.bias", "down1.mpconv.1.conv.4.running_mean", "down1.mpconv.1.conv.4.running_var", "down2.mpconv.1.conv.0.weight", "down2.mpconv.1.conv.0.bias", "down2.mpconv.1.conv.1.weight", "down2.mpconv.1.conv.1.bias", "down2.mpconv.1.conv.1.running_mean", "down2.mpconv.1.conv.1.running_var", "down2.mpconv.1.conv.3.weight", "down2.mpconv.1.conv.3.bias", "down2.mpconv.1.conv.4.weight", "down2.mpconv.1.conv.4.bias", "down2.mpconv.1.conv.4.running_mean", "down2.mpconv.1.conv.4.running_var", "down3.mpconv.1.conv.0.weight", "down3.mpconv.1.conv.0.bias", "down3.mpconv.1.conv.1.weight", "down3.mpconv.1.conv.1.bias", "down3.mpconv.1.conv.1.running_mean", "down3.mpconv.1.conv.1.running_var", "down3.mpconv.1.conv.3.weight", "down3.mpconv.1.conv.3.bias", "down3.mpconv.1.conv.4.weight", "down3.mpconv.1.conv.4.bias", "down3.mpconv.1.conv.4.running_mean", "down3.mpconv.1.conv.4.running_var", "convPa.weight", "convPa.bias", "bnPa.weight", "bnPa.bias", "bnPa.running_mean", "bnPa.running_var", "convPb.weight", "convPb.bias", "bnPb.weight", "bnPb.bias", "bnPb.running_mean", "bnPb.running_var", "convDa.weight", "convDa.bias", "bnDa.weight", "bnDa.bias", "bnDa.running_mean", "bnDa.running_var", "convDb.weight", "convDb.bias", "bnDb.weight", "bnDb.bias", "bnDb.running_mean", "bnDb.running_var". Unexpected key(s) in state_dict: "n_iter", "model_state_dict", "optimizer_state_dict", "loss".
我遇到了相同的问题,请问是您是如何解决的
self.net.load_state_dict(torch.load(weights_path, map_location=lambda storage, loc: storage))
the error is : RuntimeError: Error(s) in loading state_dict for SuperPointNet_VGG: Missing key(s) in state_dict: "inc.conv.conv.0.weight", "inc.conv.conv.0.bias", "inc.conv.conv.1.weight", "inc.conv.conv.1.bias", "inc.conv.conv.1.running_mean", "inc.conv.conv.1.running_var", "inc.conv.conv.3.weight", "inc.conv.conv.3.bias", "inc.conv.conv.4.weight", "inc.conv.conv.4.bias", "inc.conv.conv.4.running_mean", "inc.conv.conv.4.running_var", "down1.mpconv.1.conv.0.weight", "down1.mpconv.1.conv.0.bias", "down1.mpconv.1.conv.1.weight", "down1.mpconv.1.conv.1.bias", "down1.mpconv.1.conv.1.running_mean", "down1.mpconv.1.conv.1.running_var", "down1.mpconv.1.conv.3.weight", "down1.mpconv.1.conv.3.bias", "down1.mpconv.1.conv.4.weight", "down1.mpconv.1.conv.4.bias", "down1.mpconv.1.conv.4.running_mean", "down1.mpconv.1.conv.4.running_var", "down2.mpconv.1.conv.0.weight", "down2.mpconv.1.conv.0.bias", "down2.mpconv.1.conv.1.weight", "down2.mpconv.1.conv.1.bias", "down2.mpconv.1.conv.1.running_mean", "down2.mpconv.1.conv.1.running_var", "down2.mpconv.1.conv.3.weight", "down2.mpconv.1.conv.3.bias", "down2.mpconv.1.conv.4.weight", "down2.mpconv.1.conv.4.bias", "down2.mpconv.1.conv.4.running_mean", "down2.mpconv.1.conv.4.running_var", "down3.mpconv.1.conv.0.weight", "down3.mpconv.1.conv.0.bias", "down3.mpconv.1.conv.1.weight", "down3.mpconv.1.conv.1.bias", "down3.mpconv.1.conv.1.running_mean", "down3.mpconv.1.conv.1.running_var", "down3.mpconv.1.conv.3.weight", "down3.mpconv.1.conv.3.bias", "down3.mpconv.1.conv.4.weight", "down3.mpconv.1.conv.4.bias", "down3.mpconv.1.conv.4.running_mean", "down3.mpconv.1.conv.4.running_var", "convPa.weight", "convPa.bias", "bnPa.weight", "bnPa.bias", "bnPa.running_mean", "bnPa.running_var", "convPb.weight", "convPb.bias", "bnPb.weight", "bnPb.bias", "bnPb.running_mean", "bnPb.running_var", "convDa.weight", "convDa.bias", "bnDa.weight", "bnDa.bias", "bnDa.running_mean", "bnDa.running_var", "convDb.weight", "convDb.bias", "bnDb.weight", "bnDb.bias", "bnDb.running_mean", "bnDb.running_var". Unexpected key(s) in state_dict: "n_iter", "model_state_dict", "optimizer_state_dict", "loss".