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
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.
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:
my_models
model
my_model_name.pth
user_network
my_model_name.py
my_model_name.yaml
You can try to download default models and look yourself how folder-file structure looks for them.
# Remove 'module.' from layers names
my_model_dict = torch.load('my_model.pth')
keys_dict = {}
for key in my_model_dict:
keys_dict[key] = key.replace('module.', '')
for old_key, new_key in keys_dict.items():
if old_key in my_model_dict:
my_model_dict[new_key] = my_model_dict.pop(old_key)
model = CRAFT() # here you create your model, I trained my model for CRAFT (detection part).
model.load_state_dict(my_model_dict)
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: