-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RuntimeError: Mismatched state_dict keys when loading custom ResNet model into EasyOCR due to inconsistent layer naming #1343
Comments
Are you having problems during loading model or during training? When you're loading model, you show path to folder with your models. That folder has to contain 'model' folder with model weights: 'my_model_name.pth' and 'user_network' folder with model structure (classes etc) and: 'my_model_name.py' and 'my_model_name.yaml' file describing some info about model: chars etc. So it looks like this:
You can try to download default models and look yourself how folder-file structure looks for them. |
@romanvelichkin The thing is, with a VGG model of the same architecture, everything works fine. But when I try to train a ResNet model, it doesn't, and this error appears. |
Try to rename layers. Here is my code, how I do it:
|
Hi! @nrosto I am having the same problem after training. After running the train.py script I want to export that model to onnx and when I try to load my trained model I am getting the error. Did you find a solution? |
I am experiencing a RuntimeError while trying to load my custom ResNet model into EasyOCR. The error indicates that there are missing keys and unexpected keys in the state_dict during model loading.
RuntimeError: Error(s) in loading state_dict for DataParallel: Missing key(s) in state_dict: "module.FeatureExtraction.ConvNet.0.weight", "module.FeatureExtraction.ConvNet.1.weight", "module.FeatureExtraction.ConvNet.1.bias", "module.FeatureExtraction.ConvNet.1.running_mean", "module.FeatureExtraction.ConvNet.1.running_var", "module.FeatureExtraction.ConvNet.3.weight", "module.FeatureExtraction.ConvNet.4.weight", "module.FeatureExtraction.ConvNet.4.bias", "module.FeatureExtraction.ConvNet.4.running_mean", "module.FeatureExtraction.ConvNet.4.running_var", "module.FeatureExtraction.ConvNet.7.0.conv1.weight", "module.FeatureExtraction.ConvNet.7.0.bn1.weight", "module.FeatureExtraction.ConvNet.7.0.bn1.bias", "module.FeatureExtraction.ConvNet.7.0.bn1.running_mean", "module.FeatureExtraction.ConvNet.7.0.bn1.running_var", "module.FeatureExtraction.ConvNet.7.0.conv2.weight", "module.FeatureExtraction.ConvNet.7.0.bn2.weight", "module.FeatureExtraction.ConvNet.7.0.bn2.bias", "module.FeatureExtraction.ConvNet.7.0.bn2.running_mean", "module.FeatureExtraction.ConvNet.7.0.bn2.running_var", "module.FeatureExtraction.ConvNet.7.0.downsample.0.weight", "module.FeatureExtraction.ConvNet.7.0.downsample.1.weight", "module.FeatureExtraction.ConvNet.7.0.downsample.1.bias", "module.FeatureExtraction.ConvNet.7.0.downsample.1.running_mean", "module.FeatureExtraction.ConvNet.7.0.downsample.1.running_var", "module.FeatureExtraction.ConvNet.8.weight", "module.FeatureExtraction.ConvNet.9.weight", "module.FeatureExtraction.ConvNet.9.bias", "module.FeatureExtraction.ConvNet.9.running_mean", "module.FeatureExtraction.ConvNet.9.running_var", "module.FeatureExtraction.ConvNet.12.0.conv1.weight", "module.FeatureExtraction.ConvNet.12.0.bn1.weight", "module.FeatureExtraction.ConvNet.12.0.bn1.bias", "module.FeatureExtraction.ConvNet.12.0.bn1.running_mean", "module.FeatureExtraction.ConvNet.12.0.bn1.running_var", "module.FeatureExtraction.ConvNet.12.0.conv2.weight", "module.FeatureExtraction.ConvNet.12.0.bn2.weight", "module.FeatureExtraction.ConvNet.12.0.bn2.bias", "module.FeatureExtraction.ConvNet.12.0.bn2.running_mean", "module.FeatureExtraction.ConvNet.12.0.bn2.running_var", "module.FeatureExtraction.ConvNet.12.0.downsample.0.weight", "module.FeatureExtraction.ConvNet.12.0.downsample.1.weight", "module.FeatureExtraction.ConvNet.12.0.downsample.1.bias", "module.FeatureExtraction.ConvNet.12.0.downsample.1.running_mean", "module.FeatureExtraction.ConvNet.12.0.downsample.1.running_var", "module.FeatureExtraction.ConvNet.12.1.conv1.weight", "module.FeatureExtraction.ConvNet.12.1.bn1.weight", "module.FeatureExtraction.ConvNet.12.1.bn1.bias", "module.FeatureExtraction.ConvNet.12.1.bn1.running_mean", "module.FeatureExtraction.ConvNet.12.1.bn1.running_var", "module.FeatureExtraction.ConvNet.12.1.conv2.weight", "module.FeatureExtraction.ConvNet.12.1.bn2.weight", "module.FeatureExtraction.ConvNet.12.1.bn2.bias", "module.FeatureExtraction.ConvNet.12.1.bn2.running_mean", "module.FeatureExtraction.ConvNet.12.1.bn2.running_var", "module.FeatureExtraction.ConvNet.13.weight", "module.FeatureExtraction.ConvNet.14.weight", "module.FeatureExtraction.ConvNet.14.bias", "module.FeatureExtraction.ConvNet.14.running_mean", "module.FeatureExtraction.ConvNet.14.running_var", "module.FeatureExtraction.ConvNet.17.0.conv1.weight", "module.FeatureExtraction.ConvNet.17.0.bn1.weight", "module.FeatureExtraction.ConvNet.17.0.bn1.bias", "module.FeatureExtraction.ConvNet.17.0.bn1.running_mean", "module.FeatureExtraction.ConvNet.17.0.bn1.running_var", "module.FeatureExtraction.ConvNet.17.0.conv2.weight", "module.FeatureExtraction.ConvNet.17.0.bn2.weight", "module.FeatureExtraction.ConvNet.17.0.bn2.bias", "module.FeatureExtraction.ConvNet.17.0.bn2.running_mean", "module.FeatureExtraction.ConvNet.17.0.bn2.running_var", "module.FeatureExtraction.ConvNet.17.0.downsample.0.weight", "module.FeatureExtraction.ConvNet.17.0.downsample.1.weight", "module.FeatureExtraction.ConvNet.17.0.downsample.1.bias", "module.FeatureExtraction.ConvNet.17.0.downsample.1.running_mean", "module.FeatureExtraction.ConvNet.17.0.downsample.1.running_var", "module.FeatureExtraction.ConvNet.17.1.conv1.weight", "module.FeatureExtraction.ConvNet.17.1.bn1.weight", "module.FeatureExtraction.ConvNet.17.1.bn1.bias", "module.FeatureExtraction.ConvNet.17.1.bn1.running_mean", "module.FeatureExtraction.ConvNet.17.1.bn1.running_var", "module.FeatureExtraction.ConvNet.17.1.conv2.weight", "module.FeatureExtraction.ConvNet.17.1.bn2.weight", "module.FeatureExtraction.ConvNet.17.1.bn2.bias", "module.FeatureExtraction.ConvNet.17.1.bn2.running_mean", "module.FeatureExtraction.ConvNet.17.1.bn2.running_var", "module.FeatureExtraction.ConvNet.17.2.conv1.weight", "module.FeatureExtraction.ConvNet.17.2.bn1.weight", "module.FeatureExtraction.ConvNet.17.2.bn1.bias", "module.FeatureExtraction.ConvNet.17.2.bn1.running_mean", "module.FeatureExtraction.ConvNet.17.2.bn1.running_var", "module.FeatureExtraction.ConvNet.17.2.conv2.weight", "module.FeatureExtraction.ConvNet.17.2.bn2.weight", "module.FeatureExtraction.ConvNet.17.2.bn2.bias", "module.FeatureExtraction.ConvNet.17.2.bn2.running_mean", "module.FeatureExtraction.ConvNet.17.2.bn2.running_var", "module.FeatureExtraction.ConvNet.17.3.conv1.weight", "module.FeatureExtraction.ConvNet.17.3.bn1.weight", "module.FeatureExtraction.ConvNet.17.3.bn1.bias", "module.FeatureExtraction.ConvNet.17.3.bn1.running_mean", "module.FeatureExtraction.ConvNet.17.3.bn1.running_var", "module.FeatureExtraction.ConvNet.17.3.conv2.weight", "module.FeatureExtraction.ConvNet.17.3.bn2.weight", "module.FeatureExtraction.ConvNet.17.3.bn2.bias", "module.FeatureExtraction.ConvNet.17.3.bn2.running_mean", "module.FeatureExtraction.ConvNet.17.3.bn2.running_var", "module.FeatureExtraction.ConvNet.17.4.conv1.weight", "module.FeatureExtraction.ConvNet.17.4.bn1.weight", "module.FeatureExtraction.ConvNet.17.4.bn1.bias", "module.FeatureExtraction.ConvNet.17.4.bn1.running_mean", "module.FeatureExtraction.ConvNet.17.4.bn1.running_var", "module.FeatureExtraction.ConvNet.17.4.conv2.weight", "module.FeatureExtraction.ConvNet.17.4.bn2.weight", "module.FeatureExtraction.ConvNet.17.4.bn2.bias", "module.FeatureExtraction.ConvNet.17.4.bn2.running_mean", "module.FeatureExtraction.ConvNet.17.4.bn2.running_var", "module.FeatureExtraction.ConvNet.18.weight", "module.FeatureExtraction.ConvNet.19.weight", "module.FeatureExtraction.ConvNet.19.bias", "module.FeatureExtraction.ConvNet.19.running_mean", "module.FeatureExtraction.ConvNet.19.running_var", "module.FeatureExtraction.ConvNet.21.0.conv1.weight", "module.FeatureExtraction.ConvNet.21.0.bn1.weight", "module.FeatureExtraction.ConvNet.21.0.bn1.bias", "module.FeatureExtraction.ConvNet.21.0.bn1.running_mean", "module.FeatureExtraction.ConvNet.21.0.bn1.running_var", "module.FeatureExtraction.ConvNet.21.0.conv2.weight", "module.FeatureExtraction.ConvNet.21.0.bn2.weight", "module.FeatureExtraction.ConvNet.21.0.bn2.bias", "module.FeatureExtraction.ConvNet.21.0.bn2.running_mean", "module.FeatureExtraction.ConvNet.21.0.bn2.running_var", "module.FeatureExtraction.ConvNet.21.1.conv1.weight", "module.FeatureExtraction.ConvNet.21.1.bn1.weight", "module.FeatureExtraction.ConvNet.21.1.bn1.bias", "module.FeatureExtraction.ConvNet.21.1.bn1.running_mean", "module.FeatureExtraction.ConvNet.21.1.bn1.running_var", "module.FeatureExtraction.ConvNet.21.1.conv2.weight", "module.FeatureExtraction.ConvNet.21.1.bn2.weight", "module.FeatureExtraction.ConvNet.21.1.bn2.bias", "module.FeatureExtraction.ConvNet.21.1.bn2.running_mean", "module.FeatureExtraction.ConvNet.21.1.bn2.running_var", "module.FeatureExtraction.ConvNet.21.2.conv1.weight", "module.FeatureExtraction.ConvNet.21.2.bn1.weight", "module.FeatureExtraction.ConvNet.21.2.bn1.bias", "module.FeatureExtraction.ConvNet.21.2.bn1.running_mean", "module.FeatureExtraction.ConvNet.21.2.bn1.running_var", "module.FeatureExtraction.ConvNet.21.2.conv2.weight", "module.FeatureExtraction.ConvNet.21.2.bn2.weight", "module.FeatureExtraction.ConvNet.21.2.bn2.bias", "module.FeatureExtraction.ConvNet.21.2.bn2.running_mean", "module.FeatureExtraction.ConvNet.21.2.bn2.running_var", "module.FeatureExtraction.ConvNet.22.weight", "module.FeatureExtraction.ConvNet.23.weight", "module.FeatureExtraction.ConvNet.23.bias", "module.FeatureExtraction.ConvNet.23.running_mean", "module.FeatureExtraction.ConvNet.23.running_var", "module.FeatureExtraction.ConvNet.25.weight", "module.FeatureExtraction.ConvNet.26.weight", "module.FeatureExtraction.ConvNet.26.bias", "module.FeatureExtraction.ConvNet.26.running_mean", "module.FeatureExtraction.ConvNet.26.running_var".
Unexpected key(s) in state_dict: "module.FeatureExtraction.ConvNet.conv0_1.weight", "module.FeatureExtraction.ConvNet.bn0_1.weight", "module.FeatureExtraction.ConvNet.bn0_1.bias", "module.FeatureExtraction.ConvNet.bn0_1.running_mean", "module.FeatureExtraction.ConvNet.bn0_1.running_var", "module.FeatureExtraction.ConvNet.bn0_1.num_batches_tracked", "module.FeatureExtraction.ConvNet.conv0_2.weight", "module.FeatureExtraction.ConvNet.bn0_2.weight", "module.FeatureExtraction.ConvNet.bn0_2.bias", "module.FeatureExtraction.ConvNet.bn0_2.running_mean", "module.FeatureExtraction.ConvNet.bn0_2.running_var", "module.FeatureExtraction.ConvNet.bn0_2.num_batches_tracked", "module.FeatureExtraction.ConvNet.layer1.0.conv1.weight", "module.FeatureExtraction.ConvNet.layer1.0.bn1.weight", "module.FeatureExtraction.ConvNet.layer1.0.bn1.bias", "module.FeatureExtraction.ConvNet.layer1.0.bn1.running_mean", "module.FeatureExtraction.ConvNet.layer1.0.bn1.running_var", "module.FeatureExtraction.ConvNet.layer1.0.bn1.num_batches_tracked", "module.FeatureExtraction.ConvNet.layer1.0.conv2.weight", "module.FeatureExtraction.ConvNet.layer1.0.bn2.weight", "module.FeatureExtraction.ConvNet.layer1.0.bn2.bias", "module.FeatureExtraction.ConvNet.layer1.0.bn2.running_mean", "module.FeatureExtraction.ConvNet.layer1.0.bn2.running_var", "module.FeatureExtraction.ConvNet.layer1.0.bn2.num_batches_tracked", "module.FeatureExtraction.ConvNet.layer1.0.downsample.0.weight", "module.FeatureExtraction.ConvNet.layer1.0.downsample.1.weight", "module.FeatureExtraction.ConvNet.layer1.0.downsample.1.bias", "module.FeatureExtraction.ConvNet.layer1.0.downsample.1.running_mean", "module.FeatureExtraction.ConvNet.layer1.0.downsample.1.running_var", "module.FeatureExtraction.ConvNet.layer1.0.downsample.1.num_batches_tracked", "module.FeatureExtraction.ConvNet.conv1.weight", "module.FeatureExtraction.ConvNet.bn1.weight", "module.FeatureExtraction.ConvNet.bn1.bias", "module.FeatureExtraction.ConvNet.bn1.running_mean", "module.FeatureExtraction.ConvNet.bn1.running_var", "module.FeatureExtraction.ConvNet.bn1.num_batches_tracked", "module.FeatureExtraction.ConvNet.layer2.0.conv1.weight", "module.FeatureExtraction.ConvNet.layer2.0.bn1.weight", "module.FeatureExtraction.ConvNet.layer2.0.bn1.bias", "module.FeatureExtraction.ConvNet.layer2.0.bn1.running_mean", "module.FeatureExtraction.ConvNet.layer2.0.bn1.running_var", "module.FeatureExtraction.ConvNet.layer2.0.bn1.num_batches_tracked", "module.FeatureExtraction.ConvNet.layer2.0.conv2.weight", "module.FeatureExtraction.ConvNet.layer2.0.bn2.weight", "module.FeatureExtraction.ConvNet.layer2.0.bn2.bias", "module.FeatureExtraction.ConvNet.layer2.0.bn2.running_mean", "module.FeatureExtraction.ConvNet.layer2.0.bn2.running_var", "module.FeatureExtraction.ConvNet.layer2.0.bn2.num_batches_tracked", "module.FeatureExtraction.ConvNet.layer2.0.downsample.0.weight", "module.FeatureExtraction.ConvNet.layer2.0.downsample.1.weight", "module.FeatureExtraction.ConvNet.layer2.0.downsample.1.bias", "module.FeatureExtraction.ConvNet.layer2.0.downsample.1.running_mean", "module.FeatureExtraction.ConvNet.layer2.0.downsample.1.running_var", "module.FeatureExtraction.ConvNet.layer2.0.downsample.1.num_batches_tracked", "module.FeatureExtraction.ConvNet.layer2.1.conv1.weight", "module.FeatureExtraction.ConvNet.layer2.1.bn1.weight", "module.FeatureExtraction.ConvNet.layer2.1.bn1.bias", "module.FeatureExtraction.ConvNet.layer2.1.bn1.running_mean", "module.FeatureExtraction.ConvNet.layer2.1.bn1.running_var", "module.FeatureExtraction.ConvNet.layer2.1.bn1.num_batches_tracked", "module.FeatureExtraction.ConvNet.layer2.1.conv2.weight", "module.FeatureExtraction.ConvNet.layer2.1.bn2.weight", "module.FeatureExtraction.ConvNet.layer2.1.bn2.bias", "module.FeatureExtraction.ConvNet.layer2.1.bn2.running_mean", "module.FeatureExtraction.ConvNet.layer2.1.bn2.running_var", "module.FeatureExtraction.ConvNet.layer2.1.bn2.num_batches_tracked", "module.FeatureExtraction.ConvNet.conv2.weight", "module.FeatureExtraction.ConvNet.bn2.weight", "module.FeatureExtraction.ConvNet.bn2.bias", "module.FeatureExtraction.ConvNet.bn2.running_mean", "module.FeatureExtraction.ConvNet.bn2.running_var", "module.FeatureExtraction.ConvNet.bn2.num_batches_tracked", "module.FeatureExtraction.ConvNet.layer3.0.conv1.weight", "module.FeatureExtraction.ConvNet.layer3.0.bn1.weight", "module.FeatureExtraction.ConvNet.layer3.0.bn1.bias", "module.FeatureExtraction.ConvNet.layer3.0.bn1.running_mean", "module.FeatureExtraction.ConvNet.layer3.0.bn1.running_var", "module.FeatureExtraction.ConvNet.layer3.0.bn1.num_batches_tracked", "module.FeatureExtraction.ConvNet.layer3.0.conv2.weight", "module.FeatureExtraction.ConvNet.layer3.0.bn2.weight", "module.FeatureExtraction.ConvNet.layer3.0.bn2.bias", "module.FeatureExtraction.ConvNet.layer3.0.bn2.running_mean", "module.FeatureExtraction.ConvNet.layer3.0.bn2.running_var", "module.FeatureExtraction.ConvNet.layer3.0.bn2.num_batches_tracked", "module.FeatureExtraction.ConvNet.layer3.0.downsample.0.weight", "module.FeatureExtraction.ConvNet.layer3.0.downsample.1.weight", "module.FeatureExtraction.ConvNet.layer3.0.downsample.1.bias", "module.FeatureExtraction.ConvNet.layer3.0.downsample.1.running_mean", "module.FeatureExtraction.ConvNet.layer3.0.downsample.1.running_var", "module.FeatureExtraction.ConvNet.layer3.0.downsample.1.num_batches_tracked", "module.FeatureExtraction.ConvNet.layer3.1.conv1.weight", "module.FeatureExtraction.ConvNet.layer3.1.bn1.weight", "module.FeatureExtraction.ConvNet.layer3.1.bn1.bias", "module.FeatureExtraction.ConvNet.layer3.1.bn1.running_mean", "module.FeatureExtraction.ConvNet.layer3.1.bn1.running_var", "module.FeatureExtraction.ConvNet.layer3.1.bn1.num_batches_tracked", "module.FeatureExtraction.ConvNet.layer3.1.conv2.weight", "module.FeatureExtraction.ConvNet.layer3.1.bn2.weight", "module.FeatureExtraction.ConvNet.layer3.1.bn2.bias", "module.FeatureExtraction.ConvNet.layer3.1.bn2.running_mean", "module.FeatureExtraction.ConvNet.layer3.1.bn2.running_var", "module.FeatureExtraction.ConvNet.layer3.1.bn2.num_batches_tracked", "module.FeatureExtraction.ConvNet.layer3.2.conv1.weight", "module.FeatureExtraction.ConvNet.layer3.2.bn1.weight", "module.FeatureExtraction.ConvNet.layer3.2.bn1.bias", "module.FeatureExtraction.ConvNet.layer3.2.bn1.running_mean", "module.FeatureExtraction.ConvNet.layer3.2.bn1.running_var", "module.FeatureExtraction.ConvNet.layer3.2.bn1.num_batches_tracked", "module.FeatureExtraction.ConvNet.layer3.2.conv2.weight", "module.FeatureExtraction.ConvNet.layer3.2.bn2.weight", "module.FeatureExtraction.ConvNet.layer3.2.bn2.bias", "module.FeatureExtraction.ConvNet.layer3.2.bn2.running_mean", "module.FeatureExtraction.ConvNet.layer3.2.bn2.running_var", "module.FeatureExtraction.ConvNet.layer3.2.bn2.num_batches_tracked", "module.FeatureExtraction.ConvNet.layer3.3.conv1.weight", "module.FeatureExtraction.ConvNet.layer3.3.bn1.weight", "module.FeatureExtraction.ConvNet.layer3.3.bn1.bias", "module.FeatureExtraction.ConvNet.layer3.3.bn1.running_mean", "module.FeatureExtraction.ConvNet.layer3.3.bn1.running_var", "module.FeatureExtraction.ConvNet.layer3.3.bn1.num_batches_tracked", "module.FeatureExtraction.ConvNet.layer3.3.conv2.weight", "module.FeatureExtraction.ConvNet.layer3.3.bn2.weight", "module.FeatureExtraction.ConvNet.layer3.3.bn2.bias", "module.FeatureExtraction.ConvNet.layer3.3.bn2.running_mean", "module.FeatureExtraction.ConvNet.layer3.3.bn2.running_var", "module.FeatureExtraction.ConvNet.layer3.3.bn2.num_batches_tracked", "module.FeatureExtraction.ConvNet.layer3.4.conv1.weight", "module.FeatureExtraction.ConvNet.layer3.4.bn1.weight", "module.FeatureExtraction.ConvNet.layer3.4.bn1.bias", "module.FeatureExtraction.ConvNet.layer3.4.bn1.running_mean", "module.FeatureExtraction.ConvNet.layer3.4.bn1.running_var", "module.FeatureExtraction.ConvNet.layer3.4.bn1.num_batches_tracked", "module.FeatureExtraction.ConvNet.layer3.4.conv2.weight", "module.FeatureExtraction.ConvNet.layer3.4.bn2.weight", "module.FeatureExtraction.ConvNet.layer3.4.bn2.bias", "module.FeatureExtraction.ConvNet.layer3.4.bn2.running_mean", "module.FeatureExtraction.ConvNet.layer3.4.bn2.running_var", "module.FeatureExtraction.ConvNet.layer3.4.bn2.num_batches_tracked", "module.FeatureExtraction.ConvNet.conv3.weight", "module.FeatureExtraction.ConvNet.bn3.weight", "module.FeatureExtraction.ConvNet.bn3.bias", "module.FeatureExtraction.ConvNet.bn3.running_mean", "module.FeatureExtraction.ConvNet.bn3.running_var", "module.FeatureExtraction.ConvNet.bn3.num_batches_tracked", "module.FeatureExtraction.ConvNet.layer4.0.conv1.weight", "module.FeatureExtraction.ConvNet.layer4.0.bn1.weight", "module.FeatureExtraction.ConvNet.layer4.0.bn1.bias", "module.FeatureExtraction.ConvNet.layer4.0.bn1.running_mean", "module.FeatureExtraction.ConvNet.layer4.0.bn1.running_var", "module.FeatureExtraction.ConvNet.layer4.0.bn1.num_batches_tracked", "module.FeatureExtraction.ConvNet.layer4.0.conv2.weight", "module.FeatureExtraction.ConvNet.layer4.0.bn2.weight", "module.FeatureExtraction.ConvNet.layer4.0.bn2.bias", "module.FeatureExtraction.ConvNet.layer4.0.bn2.running_mean", "module.FeatureExtraction.ConvNet.layer4.0.bn2.running_var", "module.FeatureExtraction.ConvNet.layer4.0.bn2.num_batches_tracked", "module.FeatureExtraction.ConvNet.layer4.1.conv1.weight", "module.FeatureExtraction.ConvNet.layer4.1.bn1.weight", "module.FeatureExtraction.ConvNet.layer4.1.bn1.bias", "module.FeatureExtraction.ConvNet.layer4.1.bn1.running_mean", "module.FeatureExtraction.ConvNet.layer4.1.bn1.running_var", "module.FeatureExtraction.ConvNet.layer4.1.bn1.num_batches_tracked", "module.FeatureExtraction.ConvNet.layer4.1.conv2.weight", "module.FeatureExtraction.ConvNet.layer4.1.bn2.weight", "module.FeatureExtraction.ConvNet.layer4.1.bn2.bias", "module.FeatureExtraction.ConvNet.layer4.1.bn2.running_mean", "module.FeatureExtraction.ConvNet.layer4.1.bn2.running_var", "module.FeatureExtraction.ConvNet.layer4.1.bn2.num_batches_tracked", "module.FeatureExtraction.ConvNet.layer4.2.conv1.weight", "module.FeatureExtraction.ConvNet.layer4.2.bn1.weight", "module.FeatureExtraction.ConvNet.layer4.2.bn1.bias", "module.FeatureExtraction.ConvNet.layer4.2.bn1.running_mean", "module.FeatureExtraction.ConvNet.layer4.2.bn1.running_var", "module.FeatureExtraction.ConvNet.layer4.2.bn1.num_batches_tracked", "module.FeatureExtraction.ConvNet.layer4.2.conv2.weight", "module.FeatureExtraction.ConvNet.layer4.2.bn2.weight", "module.FeatureExtraction.ConvNet.layer4.2.bn2.bias", "module.FeatureExtraction.ConvNet.layer4.2.bn2.running_mean", "module.FeatureExtraction.ConvNet.layer4.2.bn2.running_var", "module.FeatureExtraction.ConvNet.layer4.2.bn2.num_batches_tracked", "module.FeatureExtraction.ConvNet.conv4_1.weight", "module.FeatureExtraction.ConvNet.bn4_1.weight", "module.FeatureExtraction.ConvNet.bn4_1.bias", "module.FeatureExtraction.ConvNet.bn4_1.running_mean", "module.FeatureExtraction.ConvNet.bn4_1.running_var", "module.FeatureExtraction.ConvNet.bn4_1.num_batches_tracked", "module.FeatureExtraction.ConvNet.conv4_2.weight", "module.FeatureExtraction.ConvNet.bn4_2.weight", "module.FeatureExtraction.ConvNet.bn4_2.bias", "module.FeatureExtraction.ConvNet.bn4_2.running_mean", "module.FeatureExtraction.ConvNet.bn4_2.running_var", "module.FeatureExtraction.ConvNet.bn4_2.num_batches_tracked".
My model architecture in custom model:
Transformation: 'None'
FeatureExtraction: 'ResNet'
SequenceModeling: 'BiLSTM'
Prediction: 'CTC'
Also, I use model.py for training and feature_extraction.py
my_custom_model.py:
class ResNet_FeatureExtractor(nn.Module):
""" FeatureExtractor of FAN (http://openaccess.thecvf.com/content_ICCV_2017/papers/Cheng_Focusing_Attention_Towards_ICCV_2017_paper.pdf) """
class BasicBlock(nn.Module):
expansion = 1
class ResNet(nn.Module):
class Model(nn.Module):
The text was updated successfully, but these errors were encountered: