Hi,
I’m trying to use the trained mobilenet-ssd-512 model from the following link:
The repo:
I’ve tried to load it as follow:
# User input- model
model_path = "./models/"
model_name = 'mobilenet-ssd-512'
input_size = 512
# Load the model
print('Start import model %s' % (model_path + model_name))
ctx = mx.cpu()
sym, arg_params, aux_params = mx.model.load_checkpoint(model_path+model_name, 0)
mod = mx.mod.Module(symbol=sym, context=ctx, label_names=None)
mod.bind(data_shapes=[('data', (1, 3, input_size, input_size))])
mod.set_params(arg_params, aux_params, allow_missing=True)
print('Finish import model %s' % (model_path + model_name))
However, got the following error:
Start import model ./models/mobilenet-ssd-512
[11:47:40] src/nnvm/legacy_json_util.cc:190: Loading symbol saved by previous version v0.12.0. Attempting to upgrade…
[11:47:40] src/nnvm/legacy_json_util.cc:198: Symbol successfully upgraded!
mxnet.base.MXNetError: Error in operator multibox_target: [11:47:40] src/operator/contrib/./multibox_target-inl.h:225: Check failed: lshape.ndim() == 3 (0 vs. 3) Label should be [batch-num_labels-(>=5)] tensor
RuntimeError: simple_bind error. Arguments:
data: (1, 3, 512, 512)
Error in operator multibox_target: [11:47:40] src/operator/contrib/./multibox_target-inl.h:225: Check failed: lshape.ndim() == 3 (0 vs. 3) Label should be [batch-num_labels-(>=5)] tensor
Did i missed something?