deep-person-reid icon indicating copy to clipboard operation
deep-person-reid copied to clipboard

Load models

Open wsw321 opened this issue 1 year ago • 7 comments

I add some layers in osnet_ain.py/OSNet, and I am train successfully. When I am trying to load weights on model using function from the tool that giving me

The following layers are discarded due to unmatched keys or layer size: ['classifier.weight', 'classifier.bias', 'conv4_local.0.conv1.conv.weight', 'conv4_local.0.conv1.bn.weight', 'conv4_local.0.conv1.bn.bias',...]

It seems that the layers I added are not loaded. How can I solve this problem? Thank you very much.

wsw321 avatar Mar 16 '23 03:03 wsw321

i have the same question!

J-LINC avatar Apr 10 '23 07:04 J-LINC

I add some layers in osnet_ain.py/OSNet, and I am train successfully. When I am trying to load weights on model using function from the tool that giving me

The following layers are discarded due to unmatched keys or layer size: ['classifier.weight', 'classifier.bias', 'conv4_local.0.conv1.conv.weight', 'conv4_local.0.conv1.bn.weight', 'conv4_local.0.conv1.bn.bias',...]

It seems that the layers I added are not loaded. How can I solve this problem? Thank you very much.

i have solve this question, The content is as follows 2023-04-10 16-08-35 的屏幕截图

J-LINC avatar Apr 10 '23 08:04 J-LINC

I add some layers in osnet_ain.py/OSNet, and I am train successfully. When I am trying to load weights on model using function from the tool that giving me The following layers are discarded due to unmatched keys or layer size: ['classifier.weight', 'classifier.bias', 'conv4_local.0.conv1.conv.weight', 'conv4_local.0.conv1.bn.weight', 'conv4_local.0.conv1.bn.bias',...] It seems that the layers I added are not loaded. How can I solve this problem? Thank you very much.

i have solve this question, The content is as follows 2023-04-10 16-08-35 的屏幕截图

Wow, incredible! How did you solve it? Where do you need to modify the code, thank you!

wsw321 avatar Apr 10 '23 08:04 wsw321

okay ,emmm,Firstly, this is the code I want to run

2023-04-10 16-20-20 的屏幕截图

and Here is the model I downloaded 2023-04-10 16-21-33 的屏幕截图

run the code ,i meet : 2023-04-10 16-22-08 的屏幕截图

J-LINC avatar Apr 10 '23 08:04 J-LINC

after that, i do some changes: 2023-04-10 16-23-02 的屏幕截图 then i successed! 2023-04-10 16-23-33 的屏幕截图

2023-04-10 16-23-56 的屏幕截图

J-LINC avatar Apr 10 '23 08:04 J-LINC

I add some layers in osnet_ain.py/OSNet, and I am train successfully. When I am trying to load weights on model using function from the tool that giving me The following layers are discarded due to unmatched keys or layer size: ['classifier.weight', 'classifier.bias', 'conv4_local.0.conv1.conv.weight', 'conv4_local.0.conv1.bn.weight', 'conv4_local.0.conv1.bn.bias',...] It seems that the layers I added are not loaded. How can I solve this problem? Thank you very much.

i have solve this question, The content is as follows 2023-04-10 16-08-35 的屏幕截图

Look at this prompt: “Incompatible layers (unmatched in name or size) will be ignored.”

J-LINC avatar Apr 10 '23 08:04 J-LINC

I add some layers in osnet_ain.py/OSNet, and I am train successfully. When I am trying to load weights on model using function from the tool that giving me The following layers are discarded due to unmatched keys or layer size: ['classifier.weight', 'classifier.bias', 'conv4_local.0.conv1.conv.weight', 'conv4_local.0.conv1.bn.weight', 'conv4_local.0.conv1.bn.bias',...] It seems that the layers I added are not loaded. How can I solve this problem? Thank you very much.

i have solve this question, The content is as follows 2023-04-10 16-08-35 的屏幕截图

Look at this prompt: “Incompatible layers (unmatched in name or size) will be ignored.”

Okay, your suggestions are very helpful to me. Thank you for your reply.

wsw321 avatar Apr 10 '23 08:04 wsw321