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/10/16 23:53:55 UTC

[GitHub] zhreshold commented on a change in pull request #12812: [MXNET-886] ONNX export: HardSigmoid, Less, Greater, Equal, InstanceNorm

zhreshold commented on a change in pull request #12812: [MXNET-886] ONNX export: HardSigmoid, Less, Greater, Equal, InstanceNorm
URL: https://github.com/apache/incubator-mxnet/pull/12812#discussion_r225744224
 
 

 ##########
 File path: python/mxnet/contrib/onnx/mx2onnx/export_onnx.py
 ##########
 @@ -118,31 +118,39 @@ def forward_pass(inputs, sym, arg_params, aux_params, output_label):
                       if graph_input not in arg_params and graph_input not in aux_params
                       and graph_input != output_label]
 
+        data_forward = []
         data_shapes = []
         # Adding extra dimension of batch_size 1 if the batch_size is different for multiple inputs.
         for idx, input_name in enumerate(data_names):
-            data_shapes.append((input_name, inputs[idx].shape))
+            val = inputs[idx]
+            data_shapes.append((input_name, val.shape))
+            data_forward.append(nd.array(val))
 
         # create module, passing cpu context
         ctx = context.cpu()
-        test_mod = mod.Module(symbol=sym, data_names=data_names, context=ctx, label_names=None)
-        test_mod.bind(for_training=False, data_shapes=data_shapes, label_shapes=None)
 
-        # initializing parameters for calculating result of each individual node
-        if arg_params is None and aux_params is None:
-            test_mod.init_params()
-        else:
-            test_mod.set_params(arg_params=arg_params, aux_params=aux_params, allow_missing=True)
+        # module bind method requires all data to have same batch size,
 
 Review comment:
   why not use sym.bind whatsoever

----------------------------------------------------------------
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