wycloveinfall / MSMDFF-NET

the code for paper "A Multi-Scale and Multi-Direction Fusion Network for Road Detection From Satellite Imagery". The code will be made public after the paper is accepted.
3 stars 2 forks source link

Size Mismatch #2

Open Jayku88 opened 5 months ago

Jayku88 commented 5 months ago

After that I tried another model and it is showing following error. How to start it by clearing previous instances

(torch1.9sta) jayakumar@hlbs-S2600STB:~/MSMDFF-NET-main$ python cfg_file/general_cfg.py cwd: /home/jayakumar/MSMDFF-NET-main data use: /home/jayakumar/MSMDFF-NET-main/dataset_split_text/deepglobe/ 本地样本划分!!! /home/jayakumar/MSMDFF-NET-main (torch1.9sta) jayakumar@hlbs-S2600STB:~/MSMDFF-NET-main$ python train.py cwd: /home/jayakumar/MSMDFF-NET-main Call Linux tasks setting file: general_cfg Time : 2024-06-24 09:24:47 MODEL_TYPE : MSMDFF_USE_SCM Data_use : /home/jayakumar/MSMDFF-NET-main/data/train/DeepGlobe Data_size : [3, 512, 512] batch_size : 32 DataEnchance: True - False Input_normal: False OPTIMIZER_SETTING : {'LOSS_FCT': 'dice_bce_loss', 'OPTIMIZER': 'Adam(AMSGrad)', 'LR_SCHEDULER': 'POLY', 'MOMENTUM': 0.9, 'WEIGHT_DECAY': 0.0005, 'LR_INIT': 0.005, 'LR_END': 1e-06, 'WARMUP_EPOCHS': 2} Train_save : /home/jayakumar/MSMDFF-NET-main/models/general_cfg-网络配置/weights/net_sate/ other log : {'main': 'default:soft iou + bce loss'} ########################### 分割线 #######################

Using POLY LR Scheduler! Traceback (most recent call last): File "train.py", line 233, in solver.load(model_name) File "/home/jayakumar/MSMDFF-NET-main/utils/frame_work_general.py", line 194, in load self.net.load_state_dict(checkpoint_all) File "/home/jayakumar/anaconda3/envs/torch1.9sta/lib/python3.8/site-packages/torch/nn/modules/module.py", line 2189, in load_state_dict raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format( RuntimeError: Error(s) in loading state_dict for DataParallel: Missing key(s) in state_dict: "module.init_block.conv_a0.0.weight", "module.init_block.conv_a0.1.weight", "module.init_block.conv_a0.1.bias", "module.init_block.conv_a0.1.running_mean", "module.init_block.conv_a0.1.running_var", "module.init_block.multi_conv1.weight", "module.init_block.multi_conv1.bias", "module.init_block.multi_conv2.weight", "module.init_block.multi_conv2.bias", "module.init_block.multi_conv3.weight", "module.init_block.multi_conv3.bias", "module.init_block.multi_conv4.weight", "module.init_block.multi_conv4.bias", "module.init_block.channel_concern.0.weight", "module.init_block.channel_concern.1.weight", "module.init_block.channel_concern.1.bias", "module.init_block.channel_concern.1.running_mean", "module.init_block.channel_concern.1.running_var", "module.encoder1.resnet_i.0.conv1.weight", "module.encoder1.resnet_i.0.bn1.weight", "module.encoder1.resnet_i.0.bn1.bias", "module.encoder1.resnet_i.0.bn1.running_mean", "module.encoder1.resnet_i.0.bn1.running_var", "module.encoder1.resnet_i.0.conv2.weight", "module.encoder1.resnet_i.0.bn2.weight", "module.encoder1.resnet_i.0.bn2.bias", "module.encoder1.resnet_i.0.bn2.running_mean", "module.encoder1.resnet_i.0.bn2.running_var", "module.encoder1.resnet_i.1.conv1.weight", "module.encoder1.resnet_i.1.bn1.weight", "module.encoder1.resnet_i.1.bn1.bias", "module.encoder1.resnet_i.1.bn1.running_mean", "module.encoder1.resnet_i.1.bn1.running_var", "module.encoder1.resnet_i.1.conv2.weight", "module.encoder1.resnet_i.1.bn2.weight", "module.encoder1.resnet_i.1.bn2.bias", "module.encoder1.resnet_i.1.bn2.running_mean", "module.encoder1.resnet_i.1.bn2.running_var", "module.encoder1.resnet_i.2.conv1.weight", "module.encoder1.resnet_i.2.bn1.weight", "module.encoder1.resnet_i.2.bn1.bias", "module.encoder1.resnet_i.2.bn1.running_mean", "module.encoder1.resnet_i.2.bn1.running_var", "module.encoder1.resnet_i.2.conv2.weight", "module.encoder1.resnet_i.2.bn2.weight", "module.encoder1.resnet_i.2.bn2.bias", "module.encoder1.resnet_i.2.bn2.running_mean", "module.encoder1.resnet_i.2.bn2.running_var", "module.encoder1.connect_i.connect_conv.conv1.weight", "module.encoder1.connect_i.connect_conv.bn1.weight", "module.encoder1.connect_i.connect_conv.bn1.bias", "module.encoder1.connect_i.connect_conv.bn1.running_mean", "module.encoder1.connect_i.connect_conv.bn1.running_var", "module.encoder1.connect_i.connect_conv.conv2.weight", "module.encoder1.connect_i.connect_conv.bn2.weight", "module.encoder1.connect_i.connect_conv.bn2.bias", "module.encoder1.connect_i.connect_conv.bn2.running_mean", "module.encoder1.connect_i.connect_conv.bn2.running_var", "module.encoder1.connect_i.connect_conv.downsample.0.weight", "module.encoder1.connect_i.connect_conv.downsample.1.weight", "module.encoder1.connect_i.connect_conv.downsample.1.bias", "module.encoder1.connect_i.connect_conv.downsample.1.running_mean", "module.encoder1.connect_i.connect_conv.downsample.1.running_var", "module.encoder2.resnet_i.0.conv1.weight", "module.encoder2.resnet_i.0.bn1.weight", "module.encoder2.resnet_i.0.bn1.bias", "module.encoder2.resnet_i.0.bn1.running_mean", "module.encoder2.resnet_i.0.bn1.running_var", "module.encoder2.resnet_i.0.conv2.weight", "module.encoder2.resnet_i.0.bn2.weight", "module.encoder2.resnet_i.0.bn2.bias", "module.encoder2.resnet_i.0.bn2.running_mean", "module.encoder2.resnet_i.0.bn2.running_var", "module.encoder2.resnet_i.0.downsample.0.weight", "module.encoder2.resnet_i.0.downsample.1.weight", "module.encoder2.resnet_i.0.downsample.1.bias", "module.encoder2.resnet_i.0.downsample.1.running_mean", "module.encoder2.resnet_i.0.downsample.1.running_var", "module.encoder2.resnet_i.1.conv1.weight", "module.encoder2.resnet_i.1.bn1.weight", "module.encoder2.resnet_i.1.bn1.bias", "module.encoder2.resnet_i.1.bn1.running_mean", "module.encoder2.resnet_i.1.bn1.running_var", "module.encoder2.resnet_i.1.conv2.weight", "module.encoder2.resnet_i.1.bn2.weight", "module.encoder2.resnet_i.1.bn2.bias", "module.encoder2.resnet_i.1.bn2.running_mean", "module.encoder2.resnet_i.1.bn2.running_var", "module.encoder2.resnet_i.2.conv1.weight", "module.encoder2.resnet_i.2.bn1.weight", "module.encoder2.resnet_i.2.bn1.bias", "module.encoder2.resnet_i.2.bn1.running_mean", "module.encoder2.resnet_i.2.bn1.running_var", "module.encoder2.resnet_i.2.conv2.weight", "module.encoder2.resnet_i.2.bn2.weight", "module.encoder2.resnet_i.2.bn2.bias", "module.encoder2.resnet_i.2.bn2.running_mean", "module.encoder2.resnet_i.2.bn2.running_var", "module.encoder2.resnet_i.3.conv1.weight", "module.encoder2.resnet_i.3.bn1.weight", "module.encoder2.resnet_i.3.bn1.bias", "module.encoder2.resnet_i.3.bn1.running_mean", "module.encoder2.resnet_i.3.bn1.running_var", "module.encoder2.resnet_i.3.conv2.weight", "module.encoder2.resnet_i.3.bn2.weight", "module.encoder2.resnet_i.3.bn2.bias", "module.encoder2.resnet_i.3.bn2.running_mean", "module.encoder2.resnet_i.3.bn2.running_var", "module.encoder2.connect_i.connect_conv.conv1.weight", "module.encoder2.connect_i.connect_conv.bn1.weight", "module.encoder2.connect_i.connect_conv.bn1.bias", "module.encoder2.connect_i.connect_conv.bn1.running_mean", "module.encoder2.connect_i.connect_conv.bn1.running_var", "module.encoder2.connect_i.connect_conv.conv2.weight", "module.encoder2.connect_i.connect_conv.bn2.weight", "module.encoder2.connect_i.connect_conv.bn2.bias", "module.encoder2.connect_i.connect_conv.bn2.running_mean", "module.encoder2.connect_i.connect_conv.bn2.running_var", "module.encoder2.connect_i.connect_conv.downsample.0.weight", "module.encoder2.connect_i.connect_conv.downsample.1.weight", "module.encoder2.connect_i.connect_conv.downsample.1.bias", "module.encoder2.connect_i.connect_conv.downsample.1.running_mean", "module.encoder2.connect_i.connect_conv.downsample.1.running_var", "module.encoder3.resnet_i.0.conv1.weight", "module.encoder3.resnet_i.0.bn1.weight", "module.encoder3.resnet_i.0.bn1.bias", "module.encoder3.resnet_i.0.bn1.running_mean", "module.encoder3.resnet_i.0.bn1.running_var", "module.encoder3.resnet_i.0.conv2.weight", "module.encoder3.resnet_i.0.bn2.weight", "module.encoder3.resnet_i.0.bn2.bias", "module.encoder3.resnet_i.0.bn2.running_mean", "module.encoder3.resnet_i.0.bn2.running_var", "module.encoder3.resnet_i.0.downsample.0.weight", "module.encoder3.resnet_i.0.downsample.1.weight", "module.encoder3.resnet_i.0.downsample.1.bias", "module.encoder3.resnet_i.0.downsample.1.running_mean", "module.encoder3.resnet_i.0.downsample.1.running_var", "module.encoder3.resnet_i.1.conv1.weight", "module.encoder3.resnet_i.1.bn1.weight", "module.encoder3.resnet_i.1.bn1.bias", "module.encoder3.resnet_i.1.bn1.running_mean", "module.encoder3.resnet_i.1.bn1.running_var", "module.encoder3.resnet_i.1.conv2.weight", "module.encoder3.resnet_i.1.bn2.weight", "module.encoder3.resnet_i.1.bn2.bias", "module.encoder3.resnet_i.1.bn2.running_mean", "module.encoder3.resnet_i.1.bn2.running_var", "module.encoder3.resnet_i.2.conv1.weight", "module.encoder3.resnet_i.2.bn1.weight", "module.encoder3.resnet_i.2.bn1.bias", "module.encoder3.resnet_i.2.bn1.running_mean", "module.encoder3.resnet_i.2.bn1.running_var", "module.encoder3.resnet_i.2.conv2.weight", "module.encoder3.resnet_i.2.bn2.weight", "module.encoder3.resnet_i.2.bn2.bias", "module.encoder3.resnet_i.2.bn2.running_mean", "module.encoder3.resnet_i.2.bn2.running_var", "module.encoder3.resnet_i.3.conv1.weight", "module.encoder3.resnet_i.3.bn1.weight", "module.encoder3.resnet_i.3.bn1.bias", "module.encoder3.resnet_i.3.bn1.running_mean", "module.encoder3.resnet_i.3.bn1.running_var", "module.encoder3.resnet_i.3.conv2.weight", "module.encoder3.resnet_i.3.bn2.weight", "module.encoder3.resnet_i.3.bn2.bias", "module.encoder3.resnet_i.3.bn2.running_mean", "module.encoder3.resnet_i.3.bn2.running_var", "module.encoder3.resnet_i.4.conv1.weight", "module.encoder3.resnet_i.4.bn1.weight", "module.encoder3.resnet_i.4.bn1.bias", "module.encoder3.resnet_i.4.bn1.running_mean", "module.encoder3.resnet_i.4.bn1.running_var", "module.encoder3.resnet_i.4.conv2.weight", "module.encoder3.resnet_i.4.bn2.weight", "module.encoder3.resnet_i.4.bn2.bias", "module.encoder3.resnet_i.4.bn2.running_mean", "module.encoder3.resnet_i.4.bn2.running_var", "module.encoder3.resnet_i.5.conv1.weight", "module.encoder3.resnet_i.5.bn1.weight", "module.encoder3.resnet_i.5.bn1.bias", "module.encoder3.resnet_i.5.bn1.running_mean", "module.encoder3.resnet_i.5.bn1.running_var", "module.encoder3.resnet_i.5.conv2.weight", "module.encoder3.resnet_i.5.bn2.weight", "module.encoder3.resnet_i.5.bn2.bias", "module.encoder3.resnet_i.5.bn2.running_mean", "module.encoder3.resnet_i.5.bn2.running_var", "module.encoder3.connect_i.connect_conv.conv1.weight", "module.encoder3.connect_i.connect_conv.bn1.weight", "module.encoder3.connect_i.connect_conv.bn1.bias", "module.encoder3.connect_i.connect_conv.bn1.running_mean", "module.encoder3.connect_i.connect_conv.bn1.running_var", "module.encoder3.connect_i.connect_conv.conv2.weight", "module.encoder3.connect_i.connect_conv.bn2.weight", "module.encoder3.connect_i.connect_conv.bn2.bias", "module.encoder3.connect_i.connect_conv.bn2.running_mean", "module.encoder3.connect_i.connect_conv.bn2.running_var", "module.encoder3.connect_i.connect_conv.downsample.0.weight", "module.encoder3.connect_i.connect_conv.downsample.1.weight", "module.encoder3.connect_i.connect_conv.downsample.1.bias", "module.encoder3.connect_i.connect_conv.downsample.1.running_mean", "module.encoder3.connect_i.connect_conv.downsample.1.running_var", "module.encoder4.resnet_i.0.conv1.weight", "module.encoder4.resnet_i.0.bn1.weight", "module.encoder4.resnet_i.0.bn1.bias", "module.encoder4.resnet_i.0.bn1.running_mean", "module.encoder4.resnet_i.0.bn1.running_var", "module.encoder4.resnet_i.0.conv2.weight", "module.encoder4.resnet_i.0.bn2.weight", "module.encoder4.resnet_i.0.bn2.bias", "module.encoder4.resnet_i.0.bn2.running_mean", "module.encoder4.resnet_i.0.bn2.running_var", "module.encoder4.resnet_i.0.downsample.0.weight", "module.encoder4.resnet_i.0.downsample.1.weight", "module.encoder4.resnet_i.0.downsample.1.bias", "module.encoder4.resnet_i.0.downsample.1.running_mean", "module.encoder4.resnet_i.0.downsample.1.running_var", "module.encoder4.resnet_i.1.conv1.weight", "module.encoder4.resnet_i.1.bn1.weight", "module.encoder4.resnet_i.1.bn1.bias", "module.encoder4.resnet_i.1.bn1.running_mean", "module.encoder4.resnet_i.1.bn1.running_var", "module.encoder4.resnet_i.1.conv2.weight", "module.encoder4.resnet_i.1.bn2.weight", "module.encoder4.resnet_i.1.bn2.bias", "module.encoder4.resnet_i.1.bn2.running_mean", "module.encoder4.resnet_i.1.bn2.running_var", "module.encoder4.resnet_i.2.conv1.weight", "module.encoder4.resnet_i.2.bn1.weight", "module.encoder4.resnet_i.2.bn1.bias", "module.encoder4.resnet_i.2.bn1.running_mean", "module.encoder4.resnet_i.2.bn1.running_var", "module.encoder4.resnet_i.2.conv2.weight", "module.encoder4.resnet_i.2.bn2.weight", "module.encoder4.resnet_i.2.bn2.bias", "module.encoder4.resnet_i.2.bn2.running_mean", "module.encoder4.resnet_i.2.bn2.running_var", "module.encoder4.connect_i.connect_conv.conv1.weight", "module.encoder4.connect_i.connect_conv.bn1.weight", "module.encoder4.connect_i.connect_conv.bn1.bias", "module.encoder4.connect_i.connect_conv.bn1.running_mean", "module.encoder4.connect_i.connect_conv.bn1.running_var", "module.encoder4.connect_i.connect_conv.conv2.weight", "module.encoder4.connect_i.connect_conv.bn2.weight", "module.encoder4.connect_i.connect_conv.bn2.bias", "module.encoder4.connect_i.connect_conv.bn2.running_mean", "module.encoder4.connect_i.connect_conv.bn2.running_var", "module.encoder4.connect_i.connect_conv.downsample.0.weight", "module.encoder4.connect_i.connect_conv.downsample.1.weight", "module.encoder4.connect_i.connect_conv.downsample.1.bias", "module.encoder4.connect_i.connect_conv.downsample.1.running_mean", "module.encoder4.connect_i.connect_conv.downsample.1.running_var", "module.c5.connect_conv.conv1.weight", "module.c5.connect_conv.bn1.weight", "module.c5.connect_conv.bn1.bias", "module.c5.connect_conv.bn1.running_mean", "module.c5.connect_conv.bn1.running_var", "module.c5.connect_conv.conv2.weight", "module.c5.connect_conv.bn2.weight", "module.c5.connect_conv.bn2.bias", "module.c5.connect_conv.bn2.running_mean", "module.c5.connect_conv.bn2.running_var", "module.c5.connect_conv.downsample.0.weight", "module.c5.connect_conv.downsample.1.weight", "module.c5.connect_conv.downsample.1.bias", "module.c5.connect_conv.downsample.1.running_mean", "module.c5.connect_conv.downsample.1.running_var", "module.c4.connect_conv.conv1.weight", "module.c4.connect_conv.bn1.weight", "module.c4.connect_conv.bn1.bias", "module.c4.connect_conv.bn1.running_mean", "module.c4.connect_conv.bn1.running_var", "module.c4.connect_conv.conv2.weight", "module.c4.connect_conv.bn2.weight", "module.c4.connect_conv.bn2.bias", "module.c4.connect_conv.bn2.running_mean", "module.c4.connect_conv.bn2.running_var", "module.c4.connect_conv.downsample.0.weight", "module.c4.connect_conv.downsample.1.weight", "module.c4.connect_conv.downsample.1.bias", "module.c4.connect_conv.downsample.1.running_mean", "module.c4.connect_conv.downsample.1.running_var", "module.c3.connect_conv.conv1.weight", "module.c3.connect_conv.bn1.weight", "module.c3.connect_conv.bn1.bias", "module.c3.connect_conv.bn1.running_mean", "module.c3.connect_conv.bn1.running_var", "module.c3.connect_conv.conv2.weight", "module.c3.connect_conv.bn2.weight", "module.c3.connect_conv.bn2.bias", "module.c3.connect_conv.bn2.running_mean", "module.c3.connect_conv.bn2.running_var", "module.c3.connect_conv.downsample.0.weight", "module.c3.connect_conv.downsample.1.weight", "module.c3.connect_conv.downsample.1.bias", "module.c3.connect_conv.downsample.1.running_mean", "module.c3.connect_conv.downsample.1.running_var", "module.c2.connect_conv.conv1.weight", "module.c2.connect_conv.bn1.weight", "module.c2.connect_conv.bn1.bias", "module.c2.connect_conv.bn1.running_mean", "module.c2.connect_conv.bn1.running_var", "module.c2.connect_conv.conv2.weight", "module.c2.connect_conv.bn2.weight", "module.c2.connect_conv.bn2.bias", "module.c2.connect_conv.bn2.running_mean", "module.c2.connect_conv.bn2.running_var", "module.c2.connect_conv.downsample.0.weight", "module.c2.connect_conv.downsample.1.weight", "module.c2.connect_conv.downsample.1.bias", "module.c2.connect_conv.downsample.1.running_mean", "module.c2.connect_conv.downsample.1.running_var", "module.decoder4.cbr1.0.weight", "module.decoder4.cbr1.0.bias", "module.decoder4.cbr1.1.weight", "module.decoder4.cbr1.1.bias", "module.decoder4.cbr1.1.running_mean", "module.decoder4.cbr1.1.running_var", "module.decoder4.cbr2.0.weight", "module.decoder4.cbr2.0.bias", "module.decoder4.cbr2.1.weight", "module.decoder4.cbr2.1.bias", "module.decoder4.cbr2.1.running_mean", "module.decoder4.cbr2.1.running_var", "module.decoder4.deconv1.weight", "module.decoder4.deconv1.bias", "module.decoder4.deconv3.weight", "module.decoder4.deconv3.bias", "module.decoder4.deconv4.weight", "module.decoder4.deconv4.bias", "module.decoder4.cbr3_1.0.weight", "module.decoder4.cbr3_1.0.bias", "module.decoder4.cbr3_1.1.weight", "module.decoder4.cbr3_1.1.bias", "module.decoder4.cbr3_1.1.running_mean", "module.decoder4.cbr3_1.1.running_var", "module.decoder4.cbr3_2.0.weight", "module.decoder4.cbr3_2.0.bias", "module.decoder4.cbr3_2.1.weight", "module.decoder4.cbr3_2.1.bias", "module.decoder4.cbr3_2.1.running_mean", "module.decoder4.cbr3_2.1.running_var", "module.decoder4.cbr3_3.0.weight", "module.decoder4.cbr3_3.0.bias", "module.decoder4.cbr3_3.1.weight", "module.decoder4.cbr3_3.1.bias", "module.decoder4.cbr3_3.1.running_mean", "module.decoder4.cbr3_3.1.running_var", "module.decoder4.cbr3_4.0.weight", "module.decoder4.cbr3_4.0.bias", "module.decoder4.cbr3_4.1.weight", "module.decoder4.cbr3_4.1.bias", "module.decoder4.cbr3_4.1.running_mean", "module.decoder4.cbr3_4.1.running_var", "module.decoder4.deconvbr.0.weight", "module.decoder4.deconvbr.0.bias", "module.decoder4.deconvbr.1.weight", "module.decoder4.deconvbr.1.bias", "module.decoder4.deconvbr.1.running_mean", "module.decoder4.deconvbr.1.running_var", "module.decoder4.bn3.weight", "module.decoder4.bn3.bias", "module.decoder4.bn3.running_mean", "module.decoder4.bn3.running_var", "module.decoder3.cbr1.0.weight", "module.decoder3.cbr1.0.bias", "module.decoder3.cbr1.1.weight", "module.decoder3.cbr1.1.bias", "module.decoder3.cbr1.1.running_mean", "module.decoder3.cbr1.1.running_var", "module.decoder3.cbr2.0.weight", "module.decoder3.cbr2.0.bias", "module.decoder3.cbr2.1.weight", "module.decoder3.cbr2.1.bias", "module.decoder3.cbr2.1.running_mean", "module.decoder3.cbr2.1.running_var", "module.decoder3.deconv1.weight", "module.decoder3.deconv1.bias", "module.decoder3.deconv3.weight", "module.decoder3.deconv3.bias", "module.decoder3.deconv4.weight", "module.decoder3.deconv4.bias", "module.decoder3.cbr3_1.0.weight", "module.decoder3.cbr3_1.0.bias", "module.decoder3.cbr3_1.1.weight", "module.decoder3.cbr3_1.1.bias", "module.decoder3.cbr3_1.1.running_mean", "module.decoder3.cbr3_1.1.running_var", "module.decoder3.cbr3_2.0.weight", "module.decoder3.cbr3_2.0.bias", "module.decoder3.cbr3_2.1.weight", "module.decoder3.cbr3_2.1.bias", "module.decoder3.cbr3_2.1.running_mean", "module.decoder3.cbr3_2.1.running_var", "module.decoder3.cbr3_3.0.weight", "module.decoder3.cbr3_3.0.bias", "module.decoder3.cbr3_3.1.weight", "module.decoder3.cbr3_3.1.bias", "module.decoder3.cbr3_3.1.running_mean", "module.decoder3.cbr3_3.1.running_var", "module.decoder3.cbr3_4.0.weight", "module.decoder3.cbr3_4.0.bias", "module.decoder3.cbr3_4.1.weight", "module.decoder3.cbr3_4.1.bias", "module.decoder3.cbr3_4.1.running_mean", "module.decoder3.cbr3_4.1.running_var", "module.decoder3.deconvbr.0.weight", "module.decoder3.deconvbr.0.bias", "module.decoder3.deconvbr.1.weight", "module.decoder3.deconvbr.1.bias", "module.decoder3.deconvbr.1.running_mean", "module.decoder3.deconvbr.1.running_var", "module.decoder3.bn3.weight", "module.decoder3.bn3.bias", "module.decoder3.bn3.running_mean", "module.decoder3.bn3.running_var", "module.decoder2.cbr1.0.weight", "module.decoder2.cbr1.0.bias", "module.decoder2.cbr1.1.weight", "module.decoder2.cbr1.1.bias", "module.decoder2.cbr1.1.running_mean", "module.decoder2.cbr1.1.running_var", "module.decoder2.cbr2.0.weight", "module.decoder2.cbr2.0.bias", "module.decoder2.cbr2.1.weight", "module.decoder2.cbr2.1.bias", "module.decoder2.cbr2.1.running_mean", "module.decoder2.cbr2.1.running_var", "module.decoder2.deconv1.weight", "module.decoder2.deconv1.bias", "module.decoder2.deconv3.weight", "module.decoder2.deconv3.bias", "module.decoder2.deconv4.weight", "module.decoder2.deconv4.bias", "module.decoder2.cbr3_1.0.weight", "module.decoder2.cbr3_1.0.bias", "module.decoder2.cbr3_1.1.weight", "module.decoder2.cbr3_1.1.bias", "module.decoder2.cbr3_1.1.running_mean", "module.decoder2.cbr3_1.1.running_var", "module.decoder2.cbr3_2.0.weight", "module.decoder2.cbr3_2.0.bias", "module.decoder2.cbr3_2.1.weight", "module.decoder2.cbr3_2.1.bias", "module.decoder2.cbr3_2.1.running_mean", "module.decoder2.cbr3_2.1.running_var", "module.decoder2.cbr3_3.0.weight", "module.decoder2.cbr3_3.0.bias", "module.decoder2.cbr3_3.1.weight", "module.decoder2.cbr3_3.1.bias", "module.decoder2.cbr3_3.1.running_mean", "module.decoder2.cbr3_3.1.running_var", "module.decoder2.cbr3_4.0.weight", "module.decoder2.cbr3_4.0.bias", "module.decoder2.cbr3_4.1.weight", "module.decoder2.cbr3_4.1.bias", "module.decoder2.cbr3_4.1.running_mean", "module.decoder2.cbr3_4.1.running_var", "module.decoder2.deconvbr.0.weight", "module.decoder2.deconvbr.0.bias", "module.decoder2.deconvbr.1.weight", "module.decoder2.deconvbr.1.bias", "module.decoder2.deconvbr.1.running_mean", "module.decoder2.deconvbr.1.running_var", "module.decoder2.bn3.weight", "module.decoder2.bn3.bias", "module.decoder2.bn3.running_mean", "module.decoder2.bn3.running_var", "module.decoder1.cbr1.0.weight", "module.decoder1.cbr1.0.bias", "module.decoder1.cbr1.1.weight", "module.decoder1.cbr1.1.bias", "module.decoder1.cbr1.1.running_mean", "module.decoder1.cbr1.1.running_var", "module.decoder1.cbr2.0.weight", "module.decoder1.cbr2.0.bias", "module.decoder1.cbr2.1.weight", "module.decoder1.cbr2.1.bias", "module.decoder1.cbr2.1.running_mean", "module.decoder1.cbr2.1.running_var", "module.decoder1.deconv1.weight", "module.decoder1.deconv1.bias", "module.decoder1.deconv3.weight", "module.decoder1.deconv3.bias", "module.decoder1.deconv4.weight", "module.decoder1.deconv4.bias", "module.decoder1.cbr3_1.0.weight", "module.decoder1.cbr3_1.0.bias", "module.decoder1.cbr3_1.1.weight", "module.decoder1.cbr3_1.1.bias", "module.decoder1.cbr3_1.1.running_mean", "module.decoder1.cbr3_1.1.running_var", "module.decoder1.cbr3_2.0.weight", "module.decoder1.cbr3_2.0.bias", "module.decoder1.cbr3_2.1.weight", "module.decoder1.cbr3_2.1.bias", "module.decoder1.cbr3_2.1.running_mean", "module.decoder1.cbr3_2.1.running_var", "module.decoder1.cbr3_3.0.weight", "module.decoder1.cbr3_3.0.bias", "module.decoder1.cbr3_3.1.weight", "module.decoder1.cbr3_3.1.bias", "module.decoder1.cbr3_3.1.running_mean", "module.decoder1.cbr3_3.1.running_var", "module.decoder1.cbr3_4.0.weight", "module.decoder1.cbr3_4.0.bias", "module.decoder1.cbr3_4.1.weight", "module.decoder1.cbr3_4.1.bias", "module.decoder1.cbr3_4.1.running_mean", "module.decoder1.cbr3_4.1.running_var", "module.decoder1.deconvbr.0.weight", "module.decoder1.deconvbr.0.bias", "module.decoder1.deconvbr.1.weight", "module.decoder1.deconvbr.1.bias", "module.decoder1.deconvbr.1.running_mean", "module.decoder1.deconvbr.1.running_var", "module.decoder1.bn3.weight", "module.decoder1.bn3.bias", "module.decoder1.bn3.running_mean", "module.decoder1.bn3.running_var". Unexpected key(s) in state_dict: "module.firstconv.weight", "module.firstbn.weight", "module.firstbn.bias", "module.firstbn.running_mean", "module.firstbn.running_var", "module.firstbn.num_batches_tracked", "module.finaldeconv1.weight", "module.finaldeconv1.bias", "module.encoder1.0.conv1.weight", "module.encoder1.0.bn1.weight", "module.encoder1.0.bn1.bias", "module.encoder1.0.bn1.running_mean", "module.encoder1.0.bn1.running_var", "module.encoder1.0.bn1.num_batches_tracked", "module.encoder1.0.conv2.weight", "module.encoder1.0.bn2.weight", "module.encoder1.0.bn2.bias", "module.encoder1.0.bn2.running_mean", "module.encoder1.0.bn2.running_var", "module.encoder1.0.bn2.num_batches_tracked", "module.encoder1.1.conv1.weight", "module.encoder1.1.bn1.weight", "module.encoder1.1.bn1.bias", "module.encoder1.1.bn1.running_mean", "module.encoder1.1.bn1.running_var", "module.encoder1.1.bn1.num_batches_tracked", "module.encoder1.1.conv2.weight", "module.encoder1.1.bn2.weight", "module.encoder1.1.bn2.bias", "module.encoder1.1.bn2.running_mean", "module.encoder1.1.bn2.running_var", "module.encoder1.1.bn2.num_batches_tracked", "module.encoder2.0.conv1.weight", "module.encoder2.0.bn1.weight", "module.encoder2.0.bn1.bias", "module.encoder2.0.bn1.running_mean", "module.encoder2.0.bn1.running_var", "module.encoder2.0.bn1.num_batches_tracked", "module.encoder2.0.conv2.weight", "module.encoder2.0.bn2.weight", "module.encoder2.0.bn2.bias", "module.encoder2.0.bn2.running_mean", "module.encoder2.0.bn2.running_var", "module.encoder2.0.bn2.num_batches_tracked", "module.encoder2.0.downsample.0.weight", "module.encoder2.0.downsample.1.weight", "module.encoder2.0.downsample.1.bias", "module.encoder2.0.downsample.1.running_mean", "module.encoder2.0.downsample.1.running_var", "module.encoder2.0.downsample.1.num_batches_tracked", "module.encoder2.1.conv1.weight", "module.encoder2.1.bn1.weight", "module.encoder2.1.bn1.bias", "module.encoder2.1.bn1.running_mean", "module.encoder2.1.bn1.running_var", "module.encoder2.1.bn1.num_batches_tracked", "module.encoder2.1.conv2.weight", "module.encoder2.1.bn2.weight", "module.encoder2.1.bn2.bias", "module.encoder2.1.bn2.running_mean", "module.encoder2.1.bn2.running_var", "module.encoder2.1.bn2.num_batches_tracked", "module.encoder3.0.conv1.weight", "module.encoder3.0.bn1.weight", "module.encoder3.0.bn1.bias", "module.encoder3.0.bn1.running_mean", "module.encoder3.0.bn1.running_var", "module.encoder3.0.bn1.num_batches_tracked", "module.encoder3.0.conv2.weight", "module.encoder3.0.bn2.weight", "module.encoder3.0.bn2.bias", "module.encoder3.0.bn2.running_mean", "module.encoder3.0.bn2.running_var", "module.encoder3.0.bn2.num_batches_tracked", "module.encoder3.0.downsample.0.weight", "module.encoder3.0.downsample.1.weight", "module.encoder3.0.downsample.1.bias", "module.encoder3.0.downsample.1.running_mean", "module.encoder3.0.downsample.1.running_var", "module.encoder3.0.downsample.1.num_batches_tracked", "module.encoder3.1.conv1.weight", "module.encoder3.1.bn1.weight", "module.encoder3.1.bn1.bias", "module.encoder3.1.bn1.running_mean", "module.encoder3.1.bn1.running_var", "module.encoder3.1.bn1.num_batches_tracked", "module.encoder3.1.conv2.weight", "module.encoder3.1.bn2.weight", "module.encoder3.1.bn2.bias", "module.encoder3.1.bn2.running_mean", "module.encoder3.1.bn2.running_var", "module.encoder3.1.bn2.num_batches_tracked", "module.encoder4.0.conv1.weight", "module.encoder4.0.bn1.weight", "module.encoder4.0.bn1.bias", "module.encoder4.0.bn1.running_mean", "module.encoder4.0.bn1.running_var", "module.encoder4.0.bn1.num_batches_tracked", "module.encoder4.0.conv2.weight", "module.encoder4.0.bn2.weight", "module.encoder4.0.bn2.bias", "module.encoder4.0.bn2.running_mean", "module.encoder4.0.bn2.running_var", "module.encoder4.0.bn2.num_batches_tracked", "module.encoder4.0.downsample.0.weight", "module.encoder4.0.downsample.1.weight", "module.encoder4.0.downsample.1.bias", "module.encoder4.0.downsample.1.running_mean", "module.encoder4.0.downsample.1.running_var", "module.encoder4.0.downsample.1.num_batches_tracked", "module.encoder4.1.conv1.weight", "module.encoder4.1.bn1.weight", "module.encoder4.1.bn1.bias", "module.encoder4.1.bn1.running_mean", "module.encoder4.1.bn1.running_var", "module.encoder4.1.bn1.num_batches_tracked", "module.encoder4.1.conv2.weight", "module.encoder4.1.bn2.weight", "module.encoder4.1.bn2.bias", "module.encoder4.1.bn2.running_mean", "module.encoder4.1.bn2.running_var", "module.encoder4.1.bn2.num_batches_tracked", "module.decoder4.conv1.weight", "module.decoder4.conv1.bias", "module.decoder4.norm1.weight", "module.decoder4.norm1.bias", "module.decoder4.norm1.running_mean", "module.decoder4.norm1.running_var", "module.decoder4.norm1.num_batches_tracked", "module.decoder4.norm2.weight", "module.decoder4.norm2.bias", "module.decoder4.norm2.running_mean", "module.decoder4.norm2.running_var", "module.decoder4.norm2.num_batches_tracked", "module.decoder4.norm3.weight", "module.decoder4.norm3.bias", "module.decoder4.norm3.running_mean", "module.decoder4.norm3.running_var", "module.decoder4.norm3.num_batches_tracked", "module.decoder3.conv1.weight", "module.decoder3.conv1.bias", "module.decoder3.norm1.weight", "module.decoder3.norm1.bias", "module.decoder3.norm1.running_mean", "module.decoder3.norm1.running_var", "module.decoder3.norm1.num_batches_tracked", "module.decoder3.norm2.weight", "module.decoder3.norm2.bias", "module.decoder3.norm2.running_mean", "module.decoder3.norm2.running_var", "module.decoder3.norm2.num_batches_tracked", "module.decoder3.norm3.weight", "module.decoder3.norm3.bias", "module.decoder3.norm3.running_mean", "module.decoder3.norm3.running_var", "module.decoder3.norm3.num_batches_tracked", "module.decoder2.conv1.weight", "module.decoder2.conv1.bias", "module.decoder2.norm1.weight", "module.decoder2.norm1.bias", "module.decoder2.norm1.running_mean", "module.decoder2.norm1.running_var", "module.decoder2.norm1.num_batches_tracked", "module.decoder2.norm2.weight", "module.decoder2.norm2.bias", "module.decoder2.norm2.running_mean", "module.decoder2.norm2.running_var", "module.decoder2.norm2.num_batches_tracked", "module.decoder2.norm3.weight", "module.decoder2.norm3.bias", "module.decoder2.norm3.running_mean", "module.decoder2.norm3.running_var", "module.decoder2.norm3.num_batches_tracked", "module.decoder1.conv1.weight", "module.decoder1.conv1.bias", "module.decoder1.norm1.weight", "module.decoder1.norm1.bias", "module.decoder1.norm1.running_mean", "module.decoder1.norm1.running_var", "module.decoder1.norm1.num_batches_tracked", "module.decoder1.norm2.weight", "module.decoder1.norm2.bias", "module.decoder1.norm2.running_mean", "module.decoder1.norm2.running_var", "module.decoder1.norm2.num_batches_tracked", "module.decoder1.norm3.weight", "module.decoder1.norm3.bias", "module.decoder1.norm3.running_mean", "module.decoder1.norm3.running_var", "module.decoder1.norm3.num_batches_tracked". size mismatch for module.decoder4.deconv2.weight: copying a param with shape torch.Size([128, 128, 3, 3]) from checkpoint, the shape in current model is torch.Size([128, 128, 9, 1]). size mismatch for module.decoder4.conv3.weight: copying a param with shape torch.Size([256, 128, 1, 1]) from checkpoint, the shape in current model is torch.Size([256, 256, 1, 1]). size mismatch for module.decoder3.deconv2.weight: copying a param with shape torch.Size([64, 64, 3, 3]) from checkpoint, the shape in current model is torch.Size([64, 64, 9, 1]). size mismatch for module.decoder3.conv3.weight: copying a param with shape torch.Size([128, 64, 1, 1]) from checkpoint, the shape in current model is torch.Size([128, 128, 1, 1]). size mismatch for module.decoder2.deconv2.weight: copying a param with shape torch.Size([32, 32, 3, 3]) from checkpoint, the shape in current model is torch.Size([32, 32, 9, 1]). size mismatch for module.decoder2.conv3.weight: copying a param with shape torch.Size([64, 32, 1, 1]) from checkpoint, the shape in current model is torch.Size([64, 64, 1, 1]). size mismatch for module.decoder1.deconv2.weight: copying a param with shape torch.Size([16, 16, 3, 3]) from checkpoint, the shape in current model is torch.Size([16, 16, 9, 1]). size mismatch for module.decoder1.conv3.weight: copying a param with shape torch.Size([64, 16, 1, 1]) from checkpoint, the shape in current model is torch.Size([64, 32, 1, 1]). size mismatch for module.finalconv2.weight: copying a param with shape torch.Size([32, 32, 3, 3]) from checkpoint, the shape in current model is torch.Size([32, 64, 3, 3]).

wycloveinfall commented 4 months ago

这个出错误的原因是:加载了不匹配的权重导致的。 建议您修改配置文件的名字,为每一个模型创建一个独有的名字,这样方便您每一次运行。如果想快速解决这个错误,请删除 https://github.com/wycloveinfall/MSMDFF-NET/blob/main/cfg_file/general_cfg.py 第126行所指向的文件目录,或者更改该目录。请注意并不是要删除代码,而是删除文件目录。 image

Jayku88 commented 4 months ago

好的。谢谢。