Open mayurmahurkar opened 4 years ago
Facing this issue in test.py
how did you solve?
that means that some model's layers have different shape then the weights you load. This is surely because you created the model with another number of classes (not 80), so the conv_110 layer has (1, 1, 1024, 75) weights' shape instead of (1, 1, 1024, 255) that the model with weights you load was.
So, you need to use yolo4_model.load_weights(model_path, by_name=True, skip_mismatch=True)
to load only coinciding layer's weights without errors. In particular, in this case all except the last 3 layers will get the weights from the checkpoint and the last 3 layers will be randomly initialized and must be trained for your task.
@Ivan-basis is right, use coco_classes.txt instead of voc_classes.txt
@Ivan-basis is there any way to fix it before we convert the weight?
I am using the converted model for another app and getting the same prob? could you help, please?