-
Notifications
You must be signed in to change notification settings - Fork 6.8k
ValueError: need more than 1 value to unpack #8390
Comments
I also tried this and got this error. '''' coreml_model = convert(mod, input_shape={'data': input_shape}) 4 : deep_dog_conv25_fwd, ConvolutionAssertionError Traceback (most recent call last) /home/ubuntu/mxnet-the-straight-dope/chapter08_computer-vision/incubator-mxnet/tools/coreml/converter/_mxnet_converter.pyc in convert(model, input_shape, order, class_labels, mode, preprocessor_args) /home/ubuntu/mxnet-the-straight-dope/chapter08_computer-vision/incubator-mxnet/tools/coreml/converter/_layers.pyc in convert_convolution(net, node, module, builder) /usr/local/lib/python2.7/dist-packages/mxnet/module/module.pyc in get_params(self) AssertionError: '''' |
This issue is arising because coreml converter uses older model api in order to work with mxnet models. The gluon model is saved in a file format which seems incompatible with that of the model api. There are two aspects of this problem. One: should model api be intelligent enough to load the gluon model (and/or vice-versa)? Secondly, how to make coreml converter be able to convert gluon models? For first, I see the need for a wider discussion. Depending on the outcome, we can figure out the right way for the second. To make problems a bit more tricky:
Will try to create a github issue with wider discussion around it. Will keep this open for coreml-converter part though. |
@apache/mxnet-committers: This issue has been inactive for the past 90 days. It has no label and needs triage. For general "how-to" questions, our user forum (and Chinese version) is a good place to get help. |
Need to add the label converter, gluon |
Note: Providing complete information in the most concise form is the best way to get help. This issue template serves as the checklist for essential information to most of the technical issues.
If the issue is non-technical, feel free to present the information in what you believe is the best form.
Description
I am trying to export the model trained from mxnet-the-straight-dope/chapter08_computer-vision tutorial but got the following error:
symbol = deep_dog_net.classifier(mx.sym.Variable('data'))
symbol.save('deep-dog-symbol.json')
filename = 'deep-dog-000'+str(epochs)+'.params'
deep_dog_net.save_params(filename)
python ./incubator-mxnet/tools/coreml/mxnet_coreml_converter.py --model-prefix='deep-dog' --epoch=5 --input-shape='{"data":"3,224,224"}' --mode=classifier --pre-processing-arguments='{"image_input_names":"data"}' --class-labels='["softmax_label"]' --output-file="coreml.mlmodel"
WARNING:root:Keras version 2.0.8 detected. Last version known to be fully compatible of Keras is 2.0.6 .
WARNING:root:TensorFlow version 1.3.0 detected. Last version known to be fully compatible is 1.2.1 .
Traceback (most recent call last):
File "./incubator-mxnet/tools/coreml/mxnet_coreml_converter.py", line 106, in
label_names=label_names
File "/home/ubuntu/mxnet-the-straight-dope/chapter08_computer-vision/incubator-mxnet/tools/coreml/converter/utils.py", line 55, in load_model
sym, arg_params, aux_params = mx.model.load_checkpoint(model_name, epoch_num)
File "/usr/local/lib/python2.7/dist-packages/mxnet/model.py", line 399, in load_checkpoint
tp, name = k.split(':', 1)
ValueError: need more than 1 value to unpack
Environment info (Required)
AWS EC2 G2.2XL. Deep learning October AMI with mxnet upgraded to mxnet==0.11.1b20171013
The text was updated successfully, but these errors were encountered: