cjolivier01 commented on a change in pull request #10472: [MXNET-106] 
[ONNX_MXNet] Change parameter names in imported model
URL: https://github.com/apache/incubator-mxnet/pull/10472#discussion_r180490866
 
 

 ##########
 File path: docs/tutorials/onnx/super_resolution.md
 ##########
 @@ -71,10 +71,19 @@ test_image = np.array(img_y)[np.newaxis, np.newaxis, :, :]
 
 We will use MXNet's Module API to run the inference. For this we will need to 
create the module, bind it to the input data and assign the loaded weights from 
the two parameter objects - argument parameters and auxilliary parameters.
 
+To obtain the input data names:
 
 ```python
-mod = mx.mod.Module(symbol=sym, data_names=['input_0'], context=mx.cpu(), 
label_names=None)
-mod.bind(for_training=False, data_shapes=[('input_0',test_image.shape)], 
label_shapes=None)
+data_names = [graph_input for graph_input in sym.list_inputs()
+                      if graph_input not in arg and graph_input not in aux]
 
 Review comment:
   my head exploded trying to figure this one out

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to