pytorch wrong when predicting using trained model
RuntimeError: Error(s) in loading state_dict for ResNet:
Missing key(s) in state_dict: "conv1.weight", "bn1.running_var", "bn1.running_mean", "bn1.bias", "bn1.weight", "layer1.0.conv1.weight", "layer1.0.bn1.running_var", "layer1.0.bn1.running_mean", "layer1.0.bn1.bias", "layer1.0.bn1.weight", "layer1.0.conv2.weight", "layer1.0.bn2.running_var", "layer1.0.bn2.running_mean", "layer1.0.bn2.bias", "layer1.0.bn2.weight", "layer1.1.conv1.weight", "layer1.1.bn1.running_var", "layer1.1.bn1.running_mean", "layer1.1.bn1.bias", "layer1.1.bn1.weight", "layer1.1.conv2.weight", "layer1.1.bn2.running_var", "layer1.1.bn2.running_mean", "layer1.1.bn2.bias", "layer1.1.bn2.weight", "layer2.0.conv1.weight", "layer2.0.bn1.running_var", "layer2.0.bn1.running_mean", "layer2.0.bn1.bias", "layer2.0.bn1.weight", "layer2.0.conv2.weight", "layer2.0.bn2.running_var", "layer2.0.bn2.running_mean", "layer2.0.bn2.bias", "layer2.0.bn2.weight", "layer2.0.downsample.0.weight", "layer2.0.downsample.1.running_var", "layer2.0.downsample.1.running_mean", "layer2.0.downsample.1.bias", "layer2.0.downsample.1.weight", "layer2.1.conv1.weight", "layer2.1.bn1.running_var", "layer2.1.bn1.running_mean", "layer2.1.bn1.bias", "layer2.1.bn1.weight", "layer2.1.conv2.weight", "layer2.1.bn2.running_var", "layer2.1.bn2.running_mean", "layer2.1.bn2.bias", "layer2.1.bn2.weight", "layer3.0.conv1.weight", "layer3.0.bn1.running_var", "layer3.0.bn1.running_mean", "layer3.0.bn1.bias", "layer3.0.bn1.weight", "layer3.0.conv2.weight", "layer3.0.bn2.running_var", "layer3.0.bn2.running_mean", "layer3.0.bn2.bias", "layer3.0.bn2.weight", "layer3.0.downsample.0.weight", "layer3.0.downsample.1.running_var", "layer3.0.downsample.1.running_mean", "layer3.0.downsample.1.bias", "layer3.0.downsample.1.weight", "layer3.1.conv1.weight", "layer3.1.bn1.running_var", "layer3.1.bn1.running_mean", "layer3.1.bn1.bias", "layer3.1.bn1.weight", "layer3.1.conv2.weight", "layer3.1.bn2.running_var", "layer3.1.bn2.running_mean", "layer3.1.bn2.bias", "layer3.1.bn2.weight", "layer4.0.conv1.weight", "layer4.0.bn1.running_var", "layer4.0.bn1.running_mean", "layer4.0.bn1.bias", "layer4.0.bn1.weight", "layer4.0.conv2.weight", "layer4.0.bn2.running_var", "layer4.0.bn2.running_mean", "layer4.0.bn2.bias", "layer4.0.bn2.weight", "layer4.0.downsample.0.weight", "layer4.0.downsample.1.running_var", "layer4.0.downsample.1.running_mean", "layer4.0.downsample.1.bias", "layer4.0.downsample.1.weight", "layer4.1.conv1.weight", "layer4.1.bn1.running_var", "layer4.1.bn1.running_mean", "layer4.1.bn1.bias", "layer4.1.bn1.weight", "layer4.1.conv2.weight", "layer4.1.bn2.running_var", "layer4.1.bn2.running_mean", "layer4.1.bn2.bias", "layer4.1.bn2.weight", "fc.bias", "fc.weight".
Unexpected key(s) in state_dict: "module.conv1.weight", "module.bn1.weight", "module.bn1.bias", "module.bn1.running_mean", "module.bn1.running_var", "module.bn1.num_batches_tracked", "module.layer1.0.conv1.weight", "module.layer1.0.bn1.weight", "module.layer1.0.bn1.bias", "module.layer1.0.bn1.running_mean", "module.layer1.0.bn1.running_var", "module.layer1.0.bn1.num_batches_tracked", "module.layer1.0.conv2.weight", "module.layer1.0.bn2.weight", "module.layer1.0.bn2.bias", "module.layer1.0.bn2.running_mean", "module.layer1.0.bn2.running_var", "module.layer1.0.bn2.num_batches_tracked", "module.layer1.1.conv1.weight", "module.layer1.1.bn1.weight", "module.layer1.1.bn1.bias", "module.layer1.1.bn1.running_mean", "module.layer1.1.bn1.running_var", "module.layer1.1.bn1.num_batches_tracked", "module.layer1.1.conv2.weight", "module.layer1.1.bn2.weight", "module.layer1.1.bn2.bias", "module.layer1.1.bn2.running_mean", "module.layer1.1.bn2.running_var", "module.layer1.1.bn2.num_batches_tracked", "module.layer2.0.conv1.weight", "module.layer2.0.bn1.weight", "module.layer2.0.bn1.bias", "module.layer2.0.bn1.running_mean", "module.layer2.0.bn1.running_var", "module.layer2.0.bn1.num_batches_tracked", "module.layer2.0.conv2.weight", "module.layer2.0.bn2.weight", "module.layer2.0.bn2.bias", "module.layer2.0.bn2.running_mean", "module.layer2.0.bn2.running_var", "module.layer2.0.bn2.num_batches_tracked", "module.layer2.0.downsample.0.weight", "module.layer2.0.downsample.1.weight", "module.layer2.0.downsample.1.bias", "module.layer2.0.downsample.1.running_mean", "module.layer2.0.downsample.1.running_var", "module.layer2.0.downsample.1.num_batches_tracked", "module.layer2.1.conv1.weight", "module.layer2.1.bn1.weight", "module.layer2.1.bn1.bias", "module.layer2.1.bn1.running_mean", "module.layer2.1.bn1.running_var", "module.layer2.1.bn1.num_batches_tracked", "module.layer2.1.conv2.weight", "module.layer2.1.bn2.weight", "module.layer2.1.bn2.bias", "module.layer2.1.bn2.running_mean", "module.layer2.1.bn2.running_var", "module.layer2.1.bn2.num_batches_tracked", "module.layer3.0.conv1.weight", "module.layer3.0.bn1.weight", "module.layer3.0.bn1.bias", "module.layer3.0.bn1.running_mean", "module.layer3.0.bn1.running_var", "module.layer3.0.bn1.num_batches_tracked", "module.layer3.0.conv2.weight", "module.layer3.0.bn2.weight", "module.layer3.0.bn2.bias", "module.layer3.0.bn2.running_mean", "module.layer3.0.bn2.running_var", "module.layer3.0.bn2.num_batches_tracked", "module.layer3.0.downsample.0.weight", "module.layer3.0.downsample.1.weight", "module.layer3.0.downsample.1.bias", "module.layer3.0.downsample.1.running_mean", "module.layer3.0.downsample.1.running_var", "module.layer3.0.downsample.1.num_batches_tracked", "module.layer3.1.conv1.weight", "module.layer3.1.bn1.weight", "module.layer3.1.bn1.bias", "module.layer3.1.bn1.running_mean", "module.layer3.1.bn1.running_var", "module.layer3.1.bn1.num_batches_tracked", "module.layer3.1.conv2.weight", "module.layer3.1.bn2.weight", "module.layer3.1.bn2.bias", "module.layer3.1.bn2.running_mean", "module.layer3.1.bn2.running_var", "module.layer3.1.bn2.num_batches_tracked", "module.layer4.0.conv1.weight", "module.layer4.0.bn1.weight", "module.layer4.0.bn1.bias", "module.layer4.0.bn1.running_mean", "module.layer4.0.bn1.running_var", "module.layer4.0.bn1.num_batches_tracked", "module.layer4.0.conv2.weight", "module.layer4.0.bn2.weight", "module.layer4.0.bn2.bias", "module.layer4.0.bn2.running_mean", "module.layer4.0.bn2.running_var", "module.layer4.0.bn2.num_batches_tracked", "module.layer4.0.downsample.0.weight", "module.layer4.0.downsample.1.weight", "module.layer4.0.downsample.1.bias", "module.layer4.0.downsample.1.running_mean", "module.layer4.0.downsample.1.running_var", "module.layer4.0.downsample.1.num_batches_tracked", "module.layer4.1.conv1.weight", "module.layer4.1.bn1.weight", "module.layer4.1.bn1.bias", "module.layer4.1.bn1.running_mean", "module.layer4.1.bn1.running_var", "module.layer4.1.bn1.num_batches_tracked", "module.layer4.1.conv2.weight", "module.layer4.1.bn2.weight", "module.layer4.1.bn2.bias", "module.layer4.1.bn2.running_mean", "module.layer4.1.bn2.running_var", "module.layer4.1.bn2.num_batches_tracked", "module.fc.weight", "module.fc.bias".
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
error 함수()error Display message and abort function. error(MSGID, ERRMSG, V1, V2, …) displays a descriptive message ERRMSG when the...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.