I would like to tweak a pre-trained model, export it and import in another system.
I am having issues as soon as I change the classes (see code below).
Ideally I would like to export architecture and weight and then use gluon.nn.SymbolBlock.imports
from gluoncv import model_zoo, data, utils
from matplotlib import pyplot as plt
net = model_zoo.get_model('yolo3_darknet53_voc', pretrained=True)
my_classes = ['car']
net.reset_class(classes=my_classes, reuse_weights=my_classes)
net.save_parameters('mymodel.params')
new_net = net = model_zoo.get_model('yolo3_darknet53_voc', pretrained=False)
new_net.load_parameters('mymodel.params')
I’ve got error shape incompatible.
Could someone explain how to do that using gluon.nn.SymbolBlock.imports
Thanks