ChengpengChen / RepGhost

RepGhost: A Hardware-Efficient Ghost Module via Re-parameterization
MIT License
168 stars 17 forks source link

How to load a pth #14

Closed LiYufengzz closed 3 months ago

LiYufengzz commented 3 months ago

When use load_state_dict(torch.load(/mypath/repghostnet_1_0x_142M_74.22.pth.tar')),It shows Missing key(s) in state_dict:"conv_stem.weight", "bn1.weight", "bn1.bias", "bn1.running_mean", "bn1.running_var", "blocks.0.0.ghost1.primary_conv.0.weight", "blocks.0.0.ghost1.primary_conv.1.weight", "blocks.0.0.ghost1.primary_conv.1.bias", "blocks.0.0.ghost1.primary_conv.1.running_mean", "blocks.0.0.ghost1.primary_conv.1.running_var", "blocks.0.0.ghost1.cheap_operation.0.weight", "blocks.0.0.ghost1.cheap_operation.1.weight", "blocks.0.0.ghost1.cheap_operation.1.bias", "blocks.0.0.ghost1.cheap_operation.1.running_mean", "blocks.0.0.ghost1.cheap_operation.1.running_var", "blocks.0.0.ghost2.primary_conv.0.weight", "blocks.0.0.ghost2.primary_conv.1.weight", "blocks.0.0.ghost2.primary_conv.1.bias", "blocks.0.0.ghost2.primary_conv.1.running_mean", "blocks.0.0.ghost2.primary_conv.1.running_var", "blocks.0.0.ghost2.cheap_operation.0.weight", "blocks.0.0.ghost2.cheap_operation.1.weight", "blocks.0.0.ghost2.cheap_operation.1.bias", "blocks.0.0.ghost2.cheap_operation.1.running_mean", "blocks.0.0.ghost2.cheap_operation.1.running_var", "blocks.1.0.ghost1.primary_conv.0.weight", "blocks.1.0.ghost1.primary_conv.1.weight", "blocks.1.0.ghost1.primary_conv.1.bias", "blocks.1.0.ghost1.primary_conv.1.running_mean", "blocks.1.0.ghost1.primary_conv.1.running_var", "blocks.1.0.ghost1.cheap_operation.0.weight", "blocks.1.0.ghost1.cheap_operation.1.weight", "blocks.1.0.ghost1.cheap_operation.1.bias", "blocks.1.0.ghost1.cheap_operation.1.running_mean", "blocks.1.0.ghost1.cheap_operation.1.running_var", "blocks.1.0.conv_dw.weight", "blocks.1.0.bn_dw.weight", "blocks.1.0.bn_dw.bias", "blocks.1.0.bn_dw.running_mean", "blocks.1.0.bn_dw.running_var", "blocks.1.0.ghost2.primary_conv.0.weight", "blocks.1.0.ghost2.primary_conv.1.weight", "blocks.1.0.ghost2.primary_conv.1.bias", "blocks.1.0.ghost2.primary_conv.1.running_mean", "blocks.1.0.ghost2.primary_conv.1.running_var", "blocks.1.0.ghost2.cheap_operation.0.weight", "blocks.1.0.ghost2.cheap_operation.1.weight", "blocks.1.0.ghost2.cheap_operation.1.bias", "blocks.1.0.ghost2.cheap_operation.1.running_mean", "blocks.1.0.ghost2.cheap_operation.1.running_var", "blocks.1.0.shortcut.0.weight", "blocks.1.0.shortcut.1.weight", "blocks.1.0.shortcut.1.bias", "blocks.1.0.shortcut.1.running_mean", "blocks.1.0.shortcut.1.running_var", "blocks.1.0.shortcut.2.weight", "blocks.1.0.shortcut.3.weight", "blocks.1.0.shortcut.3.bias", "blocks.1.0.shortcut.3.running_mean", "blocks.1.0.shortcut.3.running_var", "blocks.2.0.ghost1.primary_conv.0.weight", "blocks.2.0.ghost1.primary_conv.1.weight", "blocks.2.0.ghost1.primary_conv.1.bias", "blocks.2.0.ghost1.primary_conv.1.running_mean", "blocks.2.0.ghost1.primary_conv.1.running_var", "blocks.2.0.ghost1.cheap_operation.0.weight", "blocks.2.0.ghost1.cheap_operation.1.weight", "blocks.2.0.ghost1.cheap_operation.1.bias", "blocks.2.0.ghost1.cheap_operation.1.running_mean", "blocks.2.0.ghost1.cheap_operation.1.running_var", "blocks.2.0.ghost2.primary_conv.0.weight", "blocks.2.0.ghost2.primary_conv.1.weight", "blocks.2.0.ghost2.primary_conv.1.bias", "blocks.2.0.ghost2.primary_conv.1.running_mean", "blocks.2.0.ghost2.primary_conv.1.running_var", "blocks.2.0.ghost2.cheap_operation.0.weight", "blocks.2.0.ghost2.cheap_operation.1.weight", "blocks.2.0.ghost2.cheap_operation.1.bias", "blocks.2.0.ghost2.cheap_operation.1.running_mean", "blocks.2.0.ghost2.cheap_operation.1.running_var", "blocks.3.0.ghost1.primary_conv.0.weight", "blocks.3.0.ghost1.primary_conv.1.weight", "blocks.3.0.ghost1.primary_conv.1.bias", "blocks.3.0.ghost1.primary_conv.1.running_mean", "blocks.3.0.ghost1.primary_conv.1.running_var", "blocks.3.0.ghost1.cheap_operation.0.weight", "blocks.3.0.ghost1.cheap_operation.1.weight", "blocks.3.0.ghost1.cheap_operation.1.bias", "blocks.3.0.ghost1.cheap_operation.1.running_mean", "blocks.3.0.ghost1.cheap_operation.1.running_var", "blocks.3.0.conv_dw.weight", "blocks.3.0.bn_dw.weight", "blocks.3.0.bn_dw.bias", "blocks.3.0.bn_dw.running_mean", "blocks.3.0.bn_dw.running_var", "blocks.3.0.se.conv_reduce.weight", "blocks.3.0.se.conv_reduce.bias", "blocks.3.0.se.conv_expand.weight", "blocks.3.0.se.conv_expand.bias", "blocks.3.0.ghost2.primary_conv.0.weight", "blocks.3.0.ghost2.primary_conv.1.weight", "blocks.3.0.ghost2.primary_conv.1.bias", "blocks.3.0.ghost2.primary_conv.1.running_mean", "blocks.3.0.ghost2.primary_conv.1.running_var", "blocks.3.0.ghost2.cheap_operation.0.weight", "blocks.3.0.ghost2.cheap_operation.1.weight", "blocks.3.0.ghost2.cheap_operation.1.bias", "blocks.3.0.ghost2.cheap_operation.1.running_mean", "blocks.3.0.ghost2.cheap_operation.1.running_var", "blocks.3.0.shortcut.0.weight", "blocks.3.0.shortcut.1.weight", "blocks.3.0.shortcut.1.bias", "blocks.3.0.shortcut.1.running_mean", "blocks.3.0.shortcut.1.running_var", "blocks.3.0.shortcut.2.weight", "blocks.3.0.shortcut.3.weight", "blocks.3.0.shortcut.3.bias", "blocks.3.0.shortcut.3.running_mean", "blocks.3.0.shortcut.3.running_var", "blocks.4.0.ghost1.primary_conv.0.weight", "blocks.4.0.ghost1.primary_conv.1.weight", "blocks.4.0.ghost1.primary_conv.1.bias", "blocks.4.0.ghost1.primary_conv.1.running_mean", "blocks.4.0.ghost1.primary_conv.1.running_var", "blocks.4.0.ghost1.cheap_operation.0.weight", "blocks.4.0.ghost1.cheap_operation.1.weight", "blocks.4.0.ghost1.cheap_operation.1.bias", "blocks.4.0.ghost1.cheap_operation.1.running_mean", "blocks.4.0.ghost1.cheap_operation.1.running_var", "blocks.4.0.se.conv_reduce.weight", "blocks.4.0.se.conv_reduce.bias", "blocks.4.0.se.conv_expand.weight", "blocks.4.0.se.conv_expand.bias", "blocks.4.0.ghost2.primary_conv.0.weight", "blocks.4.0.ghost2.primary_conv.1.weight", "blocks.4.0.ghost2.primary_conv.1.bias", "blocks.4.0.ghost2.primary_conv.1.running_mean", "blocks.4.0.ghost2.primary_conv.1.running_var", "blocks.4.0.ghost2.cheap_operation.0.weight", "blocks.4.0.ghost2.cheap_operation.1.weight", "blocks.4.0.ghost2.cheap_operation.1.bias", "blocks.4.0.ghost2.cheap_operation.1.running_mean", "blocks.4.0.ghost2.cheap_operation.1.running_var", "blocks.5.0.ghost1.primary_conv.0.weight", "blocks.5.0.ghost1.primary_conv.1.weight", "blocks.5.0.ghost1.primary_conv.1.bias", "blocks.5.0.ghost1.primary_conv.1.running_mean", "blocks.5.0.ghost1.primary_conv.1.running_var", "blocks.5.0.ghost1.cheap_operation.0.weight", "blocks.5.0.ghost1.cheap_operation.1.weight", "blocks.5.0.ghost1.cheap_operation.1.bias", "blocks.5.0.ghost1.cheap_operation.1.running_mean", "blocks.5.0.ghost1.cheap_operation.1.running_var", "blocks.5.0.conv_dw.weight", "blocks.5.0.bn_dw.weight", "blocks.5.0.bn_dw.bias", "blocks.5.0.bn_dw.running_mean", "blocks.5.0.bn_dw.running_var", "blocks.5.0.ghost2.primary_conv.0.weight", "blocks.5.0.ghost2.primary_conv.1.weight", "blocks.5.0.ghost2.primary_conv.1.bias", "blocks.5.0.ghost2.primary_conv.1.running_mean", "blocks.5.0.ghost2.primary_conv.1.running_var", "blocks.5.0.ghost2.cheap_operation.0.weight", "blocks.5.0.ghost2.cheap_operation.1.weight", "blocks.5.0.ghost2.cheap_operation.1.bias", "blocks.5.0.ghost2.cheap_operation.1.running_mean", "blocks.5.0.ghost2.cheap_operation.1.running_var", "blocks.5.0.shortcut.0.weight", "blocks.5.0.shortcut.1.weight", "blocks.5.0.shortcut.1.bias", "blocks.5.0.shortcut.1.running_mean", "blocks.5.0.shortcut.1.running_var", "blocks.5.0.shortcut.2.weight", "blocks.5.0.shortcut.3.weight", "blocks.5.0.shortcut.3.bias", "blocks.5.0.shortcut.3.running_mean", "blocks.5.0.shortcut.3.running_var", "blocks.6.0.ghost1.primary_conv.0.weight", "blocks.6.0.ghost1.primary_conv.1.weight", "blocks.6.0.ghost1.primary_conv.1.bias", "blocks.6.0.ghost1.primary_conv.1.running_mean", "blocks.6.0.ghost1.primary_conv.1.running_var", "blocks.6.0.ghost1.cheap_operation.0.weight", "blocks.6.0.ghost1.cheap_operation.1.weight", "blocks.6.0.ghost1.cheap_operation.1.bias", "blocks.6.0.ghost1.cheap_operation.1.running_mean", "blocks.6.0.ghost1.cheap_operation.1.running_var", "blocks.6.0.ghost2.primary_conv.0.weight", "blocks.6.0.ghost2.primary_conv.1.weight", "blocks.6.0.ghost2.primary_conv.1.bias", "blocks.6.0.ghost2.primary_conv.1.running_mean", "blocks.6.0.ghost2.primary_conv.1.running_var", "blocks.6.0.ghost2.cheap_operation.0.weight", "blocks.6.0.ghost2.cheap_operation.1.weight", "blocks.6.0.ghost2.cheap_operation.1.bias", "blocks.6.0.ghost2.cheap_operation.1.running_mean", "blocks.6.0.ghost2.cheap_operation.1.running_var", "blocks.6.1.ghost1.primary_conv.0.weight", "blocks.6.1.ghost1.primary_conv.1.weight", "blocks.6.1.ghost1.primary_conv.1.bias", "blocks.6.1.ghost1.primary_conv.1.running_mean", "blocks.6.1.ghost1.primary_conv.1.running_var", "blocks.6.1.ghost1.cheap_operation.0.weight", "blocks.6.1.ghost1.cheap_operation.1.weight", "blocks.6.1.ghost1.cheap_operation.1.bias", "blocks.6.1.ghost1.cheap_operation.1.running_mean", "blocks.6.1.ghost1.cheap_operation.1.running_var", "blocks.6.1.ghost2.primary_conv.0.weight", "blocks.6.1.ghost2.primary_conv.1.weight", "blocks.6.1.ghost2.primary_conv.1.bias", "blocks.6.1.ghost2.primary_conv.1.running_mean", "blocks.6.1.ghost2.primary_conv.1.running_var", "blocks.6.1.ghost2.cheap_operation.0.weight", "blocks.6.1.ghost2.cheap_operation.1.weight", "blocks.6.1.ghost2.cheap_operation.1.bias", "blocks.6.1.ghost2.cheap_operation.1.running_mean", "blocks.6.1.ghost2.cheap_operation.1.running_var", "blocks.6.2.ghost1.primary_conv.0.weight", "blocks.6.2.ghost1.primary_conv.1.weight", "blocks.6.2.ghost1.primary_conv.1.bias", "blocks.6.2.ghost1.primary_conv.1.running_mean", "blocks.6.2.ghost1.primary_conv.1.running_var", "blocks.6.2.ghost1.cheap_operation.0.weight", "blocks.6.2.ghost1.cheap_operation.1.weight", "blocks.6.2.ghost1.cheap_operation.1.bias", "blocks.6.2.ghost1.cheap_operation.1.running_mean", "blocks.6.2.ghost1.cheap_operation.1.running_var", "blocks.6.2.ghost2.primary_conv.0.weight", "blocks.6.2.ghost2.primary_conv.1.weight", "blocks.6.2.ghost2.primary_conv.1.bias", "blocks.6.2.ghost2.primary_conv.1.running_mean", "blocks.6.2.ghost2.primary_conv.1.running_var", "blocks.6.2.ghost2.cheap_operation.0.weight", "blocks.6.2.ghost2.cheap_operation.1.weight", "blocks.6.2.ghost2.cheap_operation.1.bias", "blocks.6.2.ghost2.cheap_operation.1.running_mean", "blocks.6.2.ghost2.cheap_operation.1.running_var", "blocks.6.3.ghost1.primary_conv.0.weight", "blocks.6.3.ghost1.primary_conv.1.weight", "blocks.6.3.ghost1.primary_conv.1.bias", "blocks.6.3.ghost1.primary_conv.1.running_mean", "blocks.6.3.ghost1.primary_conv.1.running_var", "blocks.6.3.ghost1.cheap_operation.0.weight", "blocks.6.3.ghost1.cheap_operation.1.weight", "blocks.6.3.ghost1.cheap_operation.1.bias", "blocks.6.3.ghost1.cheap_operation.1.running_mean", "blocks.6.3.ghost1.cheap_operation.1.running_var", "blocks.6.3.se.conv_reduce.weight", "blocks.6.3.se.conv_reduce.bias", "blocks.6.3.se.conv_expand.weight", "blocks.6.3.se.conv_expand.bias", "blocks.6.3.ghost2.primary_conv.0.weight", "blocks.6.3.ghost2.primary_conv.1.weight", "blocks.6.3.ghost2.primary_conv.1.bias", "blocks.6.3.ghost2.primary_conv.1.running_mean", "blocks.6.3.ghost2.primary_conv.1.running_var", "blocks.6.3.ghost2.cheap_operation.0.weight", "blocks.6.3.ghost2.cheap_operation.1.weight", "blocks.6.3.ghost2.cheap_operation.1.bias", "blocks.6.3.ghost2.cheap_operation.1.running_mean", "blocks.6.3.ghost2.cheap_operation.1.running_var", "blocks.6.3.shortcut.0.weight", "blocks.6.3.shortcut.1.weight", "blocks.6.3.shortcut.1.bias", "blocks.6.3.shortcut.1.running_mean", "blocks.6.3.shortcut.1.running_var", "blocks.6.3.shortcut.2.weight", "blocks.6.3.shortcut.3.weight", "blocks.6.3.shortcut.3.bias", "blocks.6.3.shortcut.3.running_mean", "blocks.6.3.shortcut.3.running_var", "blocks.6.4.ghost1.primary_conv.0.weight", "blocks.6.4.ghost1.primary_conv.1.weight", "blocks.6.4.ghost1.primary_conv.1.bias", "blocks.6.4.ghost1.primary_conv.1.running_mean", "blocks.6.4.ghost1.primary_conv.1.running_var", "blocks.6.4.ghost1.cheap_operation.0.weight", "blocks.6.4.ghost1.cheap_operation.1.weight", "blocks.6.4.ghost1.cheap_operation.1.bias", "blocks.6.4.ghost1.cheap_operation.1.running_mean", "blocks.6.4.ghost1.cheap_operation.1.running_var", "blocks.6.4.se.conv_reduce.weight", "blocks.6.4.se.conv_reduce.bias", "blocks.6.4.se.conv_expand.weight", "blocks.6.4.se.conv_expand.bias", "blocks.6.4.ghost2.primary_conv.0.weight", "blocks.6.4.ghost2.primary_conv.1.weight", "blocks.6.4.ghost2.primary_conv.1.bias", "blocks.6.4.ghost2.primary_conv.1.running_mean", "blocks.6.4.ghost2.primary_conv.1.running_var", "blocks.6.4.ghost2.cheap_operation.0.weight", "blocks.6.4.ghost2.cheap_operation.1.weight", "blocks.6.4.ghost2.cheap_operation.1.bias", "blocks.6.4.ghost2.cheap_operation.1.running_mean", "blocks.6.4.ghost2.cheap_operation.1.running_var", "blocks.7.0.ghost1.primary_conv.0.weight", "blocks.7.0.ghost1.primary_conv.1.weight", "blocks.7.0.ghost1.primary_conv.1.bias", "blocks.7.0.ghost1.primary_conv.1.running_mean", "blocks.7.0.ghost1.primary_conv.1.running_var", "blocks.7.0.ghost1.cheap_operation.0.weight", "blocks.7.0.ghost1.cheap_operation.1.weight", "blocks.7.0.ghost1.cheap_operation.1.bias", "blocks.7.0.ghost1.cheap_operation.1.running_mean", "blocks.7.0.ghost1.cheap_operation.1.running_var", "blocks.7.0.conv_dw.weight", "blocks.7.0.bn_dw.weight", "blocks.7.0.bn_dw.bias", "blocks.7.0.bn_dw.running_mean", "blocks.7.0.bn_dw.running_var", "blocks.7.0.se.conv_reduce.weight", "blocks.7.0.se.conv_reduce.bias", "blocks.7.0.se.conv_expand.weight", "blocks.7.0.se.conv_expand.bias", "blocks.7.0.ghost2.primary_conv.0.weight", "blocks.7.0.ghost2.primary_conv.1.weight", "blocks.7.0.ghost2.primary_conv.1.bias", "blocks.7.0.ghost2.primary_conv.1.running_mean", "blocks.7.0.ghost2.primary_conv.1.running_var", "blocks.7.0.ghost2.cheap_operation.0.weight", "blocks.7.0.ghost2.cheap_operation.1.weight", "blocks.7.0.ghost2.cheap_operation.1.bias", "blocks.7.0.ghost2.cheap_operation.1.running_mean", "blocks.7.0.ghost2.cheap_operation.1.running_var", "blocks.7.0.shortcut.0.weight", "blocks.7.0.shortcut.1.weight", "blocks.7.0.shortcut.1.bias", "blocks.7.0.shortcut.1.running_mean", "blocks.7.0.shortcut.1.running_var", "blocks.7.0.shortcut.2.weight", "blocks.7.0.shortcut.3.weight", "blocks.7.0.shortcut.3.bias", "blocks.7.0.shortcut.3.running_mean", "blocks.7.0.shortcut.3.running_var", "blocks.8.0.ghost1.primary_conv.0.weight", "blocks.8.0.ghost1.primary_conv.1.weight", "blocks.8.0.ghost1.primary_conv.1.bias", "blocks.8.0.ghost1.primary_conv.1.running_mean", "blocks.8.0.ghost1.primary_conv.1.running_var", "blocks.8.0.ghost1.cheap_operation.0.weight", "blocks.8.0.ghost1.cheap_operation.1.weight", "blocks.8.0.ghost1.cheap_operation.1.bias", "blocks.8.0.ghost1.cheap_operation.1.running_mean", "blocks.8.0.ghost1.cheap_operation.1.running_var", "blocks.8.0.ghost2.primary_conv.0.weight", "blocks.8.0.ghost2.primary_conv.1.weight", "blocks.8.0.ghost2.primary_conv.1.bias", "blocks.8.0.ghost2.primary_conv.1.running_mean", "blocks.8.0.ghost2.primary_conv.1.running_var", "blocks.8.0.ghost2.cheap_operation.0.weight", "blocks.8.0.ghost2.cheap_operation.1.weight", "blocks.8.0.ghost2.cheap_operation.1.bias", "blocks.8.0.ghost2.cheap_operation.1.running_mean", "blocks.8.0.ghost2.cheap_operation.1.running_var", "blocks.8.1.ghost1.primary_conv.0.weight", "blocks.8.1.ghost1.primary_conv.1.weight", "blocks.8.1.ghost1.primary_conv.1.bias", "blocks.8.1.ghost1.primary_conv.1.running_mean", "blocks.8.1.ghost1.primary_conv.1.running_var", "blocks.8.1.ghost1.cheap_operation.0.weight", "blocks.8.1.ghost1.cheap_operation.1.weight", "blocks.8.1.ghost1.cheap_operation.1.bias", "blocks.8.1.ghost1.cheap_operation.1.running_mean", "blocks.8.1.ghost1.cheap_operation.1.running_var", "blocks.8.1.se.conv_reduce.weight", "blocks.8.1.se.conv_reduce.bias", "blocks.8.1.se.conv_expand.weight", "blocks.8.1.se.conv_expand.bias", "blocks.8.1.ghost2.primary_conv.0.weight", "blocks.8.1.ghost2.primary_conv.1.weight", "blocks.8.1.ghost2.primary_conv.1.bias", "blocks.8.1.ghost2.primary_conv.1.running_mean", "blocks.8.1.ghost2.primary_conv.1.running_var", "blocks.8.1.ghost2.cheap_operation.0.weight", "blocks.8.1.ghost2.cheap_operation.1.weight", "blocks.8.1.ghost2.cheap_operation.1.bias", "blocks.8.1.ghost2.cheap_operation.1.running_mean", "blocks.8.1.ghost2.cheap_operation.1.running_var", "blocks.8.2.ghost1.primary_conv.0.weight", "blocks.8.2.ghost1.primary_conv.1.weight", "blocks.8.2.ghost1.primary_conv.1.bias", "blocks.8.2.ghost1.primary_conv.1.running_mean", "blocks.8.2.ghost1.primary_conv.1.running_var", "blocks.8.2.ghost1.cheap_operation.0.weight", "blocks.8.2.ghost1.cheap_operation.1.weight", "blocks.8.2.ghost1.cheap_operation.1.bias", "blocks.8.2.ghost1.cheap_operation.1.running_mean", "blocks.8.2.ghost1.cheap_operation.1.running_var", "blocks.8.2.ghost2.primary_conv.0.weight", "blocks.8.2.ghost2.primary_conv.1.weight", "blocks.8.2.ghost2.primary_conv.1.bias", "blocks.8.2.ghost2.primary_conv.1.running_mean", "blocks.8.2.ghost2.primary_conv.1.running_var", "blocks.8.2.ghost2.cheap_operation.0.weight", "blocks.8.2.ghost2.cheap_operation.1.weight", "blocks.8.2.ghost2.cheap_operation.1.bias", "blocks.8.2.ghost2.cheap_operation.1.running_mean", "blocks.8.2.ghost2.cheap_operation.1.running_var", "blocks.8.3.ghost1.primary_conv.0.weight", "blocks.8.3.ghost1.primary_conv.1.weight", "blocks.8.3.ghost1.primary_conv.1.bias", "blocks.8.3.ghost1.primary_conv.1.running_mean", "blocks.8.3.ghost1.primary_conv.1.running_var", "blocks.8.3.ghost1.cheap_operation.0.weight", "blocks.8.3.ghost1.cheap_operation.1.weight", "blocks.8.3.ghost1.cheap_operation.1.bias", "blocks.8.3.ghost1.cheap_operation.1.running_mean", "blocks.8.3.ghost1.cheap_operation.1.running_var", "blocks.8.3.se.conv_reduce.weight", "blocks.8.3.se.conv_reduce.bias", "blocks.8.3.se.conv_expand.weight", "blocks.8.3.se.conv_expand.bias", "blocks.8.3.ghost2.primary_conv.0.weight", "blocks.8.3.ghost2.primary_conv.1.weight", "blocks.8.3.ghost2.primary_conv.1.bias", "blocks.8.3.ghost2.primary_conv.1.running_mean", "blocks.8.3.ghost2.primary_conv.1.running_var", "blocks.8.3.ghost2.cheap_operation.0.weight", "blocks.8.3.ghost2.cheap_operation.1.weight", "blocks.8.3.ghost2.cheap_operation.1.bias", "blocks.8.3.ghost2.cheap_operation.1.running_mean", "blocks.8.3.ghost2.cheap_operation.1.running_var", "blocks.9.0.conv.weight", "blocks.9.0.bn1.weight", "blocks.9.0.bn1.bias", "blocks.9.0.bn1.running_mean", "blocks.9.0.bn1.running_var", "conv_head.weight", "conv_head.bias", "classifier.weight", "classifier.bias". Unexpected key(s) in state_dict: "epoch", "arch", "state_dict", "optimizer", "version", "args", "amp_scaler", "state_dict_ema", "metric".

ChengpengChen commented 3 months ago

you should use the 'state_dict' or 'state_dict_ema' in the pth file to initialize the model, that is

load_state_dict(torch.load(/mypath/repghostnet_1_0x_142M_74.22.pth.tar')['state_dict_ema']), or load_state_dict(torch.load(/mypath/repghostnet_1_0x_142M_74.22.pth.tar')['state_dict'])

LiYufengzz commented 3 months ago

thanks!