You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2018/05/18 15:51:37 UTC

[GitHub] HyperGroups opened a new issue #10998: problem of import model-res152

HyperGroups opened a new issue #10998: problem of import model-res152
URL: https://github.com/apache/incubator-mxnet/issues/10998
 
 
   the model is generated by Wolfram-Mathematica 11.3, mxnet-10001
   
   in my .json file , the InputData name is "Input"
   	"nodes":[
   		{"op":"null","name":"Input","attrs":{},"inputs":[]},
   
   then 
   
   in MXNet-Python with the following codes, I cann't import the model and gives the right prediction.
   
   ```
   with sym, arg_params, aux_params = mx.model.load_checkpoint(model_prefix, 0000)
   mod = mx.mod.Module(symbol=sym, context=ctx, label_names=None)
   mod.bind(for_training=False, data_shapes=[('Input', (1,3,224,224))],
            label_shapes=mod._label_shapes)
   mod.set_params(arg_params, aux_params, allow_missing=True)
   ```
   
   Error Info is
   ```
   Traceback (most recent call last):
     File "/home/hypergroups/Nutstore/ProjectsOnline/My/Python/MXNet/1.0/script/test_resnet.py", line 24, in <module>
       mod = mx.mod.Module(symbol=sym, context=ctx, label_names=None)
     File "/opt/anaconda2/lib/python2.7/site-packages/mxnet/module/module.py", line 94, in __init__
       _check_input_names(symbol, data_names, "data", True)
     File "/opt/anaconda2/lib/python2.7/site-packages/mxnet/module/base_module.py", line 51, in _check_input_names
       raise ValueError(msg)
   ValueError: You created Module with Module(..., data_names=['data']) but input with name 'data' is not found in symbol.list_arguments(). Did you mean one of:
   	Input
   	conv1.Weights
   	bn_conv1.Gamma
   	bn_conv1.Beta
   ```
   
   
   The solution is simple, manually modify my .json file, change 'Input' into 'data'...
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services