Hi Indu,
Here is the script I am using(the same one in the blog) - https://pastebin.com/NC7Qg6dy
Here is my model_algo_1-symbol.json file - https://pastebin.com/mPaR1zYx
Here is the command that I am trying to run:
python load_model.py --label-name 'cls_prob' --img 'test.jpg' --prefix 'model_algo_1' --synset 'synset.txt'
synset.txt contains just one word in a single line - ‘car’ which is the only object the model is trained to detect.
The error I am getting is this:
[02:49:20] src/nnvm/legacy_json_util.cc:209: Loading symbol saved by previous version v1.2.1. Attempting to upgrade...
[02:49:20] src/nnvm/legacy_json_util.cc:217: Symbol successfully upgraded!
/usr/local/lib/python2.7/dist-packages/mxnet/module/base_module.py:55: UserWarning: You created Module with Module(..., label_names=['cls_prob']) but input with name 'cls_prob' is not found in symbol.list_arguments(). Did you mean one of:
relu4_3_scale
data
label
warnings.warn(msg)
/usr/local/lib/python2.7/dist-packages/mxnet/module/base_module.py:67: UserWarning: Data provided by label_shapes don't match names specified by label_names ([] vs. ['cls_prob'])
warnings.warn(msg)
Traceback (most recent call last):
File "load_model.py", line 105, in <module>
mod = ImagenetModel(args.synset, args.prefix, label_names=[args.label_name], params_url=args.params_url, symbol_url=args.symbol_url, synset_url=args.synset_url)
File "load_model.py", line 45, in __init__
self.mod.bind(for_training=False, data_shapes= input_shapes)
File "/usr/local/lib/python2.7/dist-packages/mxnet/module/module.py", line 429, in bind
state_names=self._state_names)
File "/usr/local/lib/python2.7/dist-packages/mxnet/module/executor_group.py", line 279, in __init__
self.bind_exec(data_shapes, label_shapes, shared_group)
File "/usr/local/lib/python2.7/dist-packages/mxnet/module/executor_group.py", line 375, in bind_exec
shared_group))
File "/usr/local/lib/python2.7/dist-packages/mxnet/module/executor_group.py", line 662, in _bind_ith_exec
shared_buffer=shared_data_arrays, **input_shapes)
File "/usr/local/lib/python2.7/dist-packages/mxnet/symbol/symbol.py", line 1528, in simple_bind
raise RuntimeError(error_msg)
RuntimeError: simple_bind error. Arguments:
data: (1, 3, 224, 224)
Error in operator multi_feat_5_conv_3x3_conv: [02:49:20] src/operator/nn/convolution.cc:193: Check failed: dilated_ksize_y <= AddPad(dshape[2], param_.pad[0]) (3 vs. 2) kernel size exceed input
Stack trace returned 10 entries:
[bt] (0) /usr/local/lib/python2.7/dist-packages/mxnet/libmxnet.so(+0x1befb4) [0x7fc7321cefb4]
[bt] (1) /usr/local/lib/python2.7/dist-packages/mxnet/libmxnet.so(+0x1bf391) [0x7fc7321cf391]
[bt] (2) /usr/local/lib/python2.7/dist-packages/mxnet/libmxnet.so(+0x4a1d86) [0x7fc7324b1d86]
[bt] (3) /usr/local/lib/python2.7/dist-packages/mxnet/libmxnet.so(+0x29b3fba) [0x7fc7349c3fba]
[bt] (4) /usr/local/lib/python2.7/dist-packages/mxnet/libmxnet.so(+0x29b6964) [0x7fc7349c6964]
[bt] (5) /usr/local/lib/python2.7/dist-packages/mxnet/libmxnet.so(+0x29a2efa) [0x7fc7349b2efa]
[bt] (6) /usr/local/lib/python2.7/dist-packages/mxnet/libmxnet.so(+0x29a3a34) [0x7fc7349b3a34]
[bt] (7) /usr/local/lib/python2.7/dist-packages/mxnet/libmxnet.so(MXExecutorSimpleBind+0x2368) [0x7fc73490ee48]
[bt] (8) /usr/lib/x86_64-linux-gnu/libffi.so.6(ffi_call_unix64+0x4c) [0x7fc741fe1e40]
[bt] (9) /usr/lib/x86_64-linux-gnu/libffi.so.6(ffi_call+0x2eb) [0x7fc741fe18ab]
Let me know if you would like access to all 3 files(hyperparameters.json, model_algo_1-0000.params, model_algo_1-symbol.json) and I will share it with you.