dmlc/gluon-cv

How to use a trained params to predict?

Open

#229 aperta il 2 ago 2018

Vedi su GitHub
 (9 commenti) (0 reazioni) (0 assegnatari)Python (1224 fork)batch import
good first issuequestion

Metriche repository

Star
 (5610 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

Hi. I am a new one here. It is a awesome lib for CV, thanks for your great work. Now, I am encountering a problem that I trained ssd_300_vgg16_atrous_voc on my own dataset, the dataset has 4 classes. After training, I got a "ssd_300_vgg16_atrous_voc_best.params" file. When I want to load the parmeters and predict on new images, it return an error, logs as it, AssertionError: Failed loading Parameter 'ssd0_convpredictor4_conv0_weight' from saved params: shape incompatible expected (126, 0, 3, 3) vs saved (30, 512, 3, 3) The command I used as follow, from gluoncv import model_zoo, data, utils from matplotlib import pyplot as plt import mxnet as mx ctx = [mx.cpu()] net = model_zoo.get_model('ssd_300_vgg16_atrous_voc', pretrained=False) net.load_parameters('ssd_300_vgg16_atrous_voc_best.params', ctx = ctx)

Thanks for any help.

Guida contributor