Hi there,
I finetuned an object detection model in order to recognize some custom
classes, mostly following the related
[tutorial](https://gluon-cv.mxnet.io/build/examples_detection/finetune_detection.html#sphx-glr-download-build-examples-detection-finetune-detection-py).
I used "ssd_512_resnet50_v1_coco" as base model, and the training process ended
successfully (the accuracy on the validation dataset is reasonably high).
The problem is, I tried running inference with the newly trained model, by
using:
classes = ["CML_mug", "person"]
net = gcv.model_zoo.get_model('ssd_512_resnet50_v1_custom',
classes=classes,
pretrained_base=False,
ctx=ctx)
net.load_params("saved_weights/CML_00/-0070.params", ctx=ctx)
but I get the error:
AssertionError: Parameter 'resnetv10_conv0_weight' is missing in file:
saved_weights/CML_00/-0070.params, which contains parameters:
'ssd1_ssd0_resnetv10_conv0_weight', 'ssd1_ssd0_resnetv10_batchnorm0_gamma',
'ssd1_ssd0_resnetv10_batchnorm0_beta', ...,
'ssd1_ssd0_ssdanchorgenerator2_anchor_2',
'ssd1_ssd0_ssdanchorgenerator3_anchor_3',
'ssd1_ssd0_ssdanchorgenerator4_anchor_4',
'ssd1_ssd0_ssdanchorgenerator5_anchor_5'. Please make sure source and target
networks have the same prefix.
So, it seems the network parameters are named differently in the .params file
and in the model I'm using for inference. I found a couple of topics about it,
but I didn't get how to fix it.
I assume I should remove the 'ssd1_ssd0' part before the network parameters
names in the .params file, but I cannot open it to modify it.
---
[Visit
Topic](https://discuss.mxnet.io/t/parameter-name-mismatch-in-finetuned-model/6520/1)
or reply to this email to respond.
You are receiving this because you enabled mailing list mode.
To unsubscribe from these emails, [click
here](https://discuss.mxnet.io/email/unsubscribe/6acbcbf5f40b31dfe72980f888fe4fe3b16dbf7a34f2cae2eb3b85c81cb5c9ca).