ThomasGmeinder opened a new issue #17621: get_inputs function in 
_op_translations.py does not support outputs from SliceChannel
URL: https://github.com/apache/incubator-mxnet/issues/17621
 
 
   ## Description
   The get_info function in _op_translations.py does not support nodes that 
have multiple outputs (like Split)
   
   The inputs of the following node are generated from the name only:
           input_nodes.append(proc_nodes[input_node_id].name)
   
https://github.com/apache/incubator-mxnet/blob/4559ab83b81e63e92887602b1b950082ec53744c/python/mxnet/contrib/onnx/mx2onnx/_op_translations.py#L140
   
   name does not match the output for operators with multiple outputs because 
_output plus index is appended in those cases. 
   E.g. during make_node for the Split operator:
              [name+'_output'+str(i) for i in range(num_outputs)],
   
https://github.com/apache/incubator-mxnet/blob/4559ab83b81e63e92887602b1b950082ec53744c/python/mxnet/contrib/onnx/mx2onnx/_op_translations.py#L1541
   
   This causes the following for nodes that input from Split Operator. 
   
   ### Error Message
   onnx.onnx_cpp2py_export.checker.ValidationError: Nodes in a graph must be 
topologically sorted, however input '_split1' of node: 
   input: "_split1" input: "scalar_op293" output: "__mulscalar2" name: 
"_mulscalar2" op_type: "Mul"
    is not output of any previous nodes.
   
   ## To Reproduce
   Create a mxnet network that uses a SliceChannel Operation with more than one 
output.
   The .json exprted from mxnet should look something like this:
       {
         "op": "SliceChannel", 
         "name": "_split2", 
         "attrs": {
           "axis": "-1", 
           "num_outputs": "4"
         }, 
         "inputs": [[345, 0, 0]]
       }, 
   
   ## What have you tried to solve it?
   I fixed the bug on my fork and will mention this issue in the commit
   
   ## Environment
   
   We recommend using our script for collecting the diagnositc information. Run 
the following command and paste the outputs below:
   ```
   curl --retry 10 -s 
https://raw.githubusercontent.com/dmlc/gluon-nlp/master/tools/diagnose.py | 
python
   
   ----------Python Info----------
   Version      : 3.7.4
   Compiler     : Clang 4.0.1 (tags/RELEASE_401/final)
   Build        : ('default', 'Aug 13 2019 15:17:50')
   Arch         : ('64bit', '')
   ------------Pip Info-----------
   Version      : 20.0.2
   Directory    : /opt/anaconda3/lib/python3.7/site-packages/pip
   ----------MXNet Info-----------
   Version      : 1.5.0
   Directory    : /opt/anaconda3/lib/python3.7/site-packages/mxnet
   Num GPUs     : 0
   Commit Hash   : c9818480680f84daa6e281a974ab263691302ba8
   ----------System Info----------
   Platform     : Darwin-18.7.0-x86_64-i386-64bit
   system       : Darwin
   node         : Gimpel.local
   release      : 18.7.0
   version      : Darwin Kernel Version 18.7.0: Tue Aug 20 16:57:14 PDT 2019; 
root:xnu-4903.271.2~2/RELEASE_X86_64
   ----------Hardware Info----------
   machine      : x86_64
   processor    : i386
   b'machdep.cpu.brand_string: Intel(R) Core(TM) i5-5287U CPU @ 2.90GHz'
   b'machdep.cpu.features: FPU VME DE PSE TSC MSR PAE MCE CX8 APIC SEP MTRR PGE 
MCA CMOV PAT PSE36 CLFSH DS ACPI MMX FXSR SSE SSE2 SS HTT TM PBE SSE3 PCLMULQDQ 
DTES64 MON DSCPL VMX EST TM2 SSSE3 FMA CX16 TPR PDCM SSE4.1 SSE4.2 x2APIC MOVBE 
POPCNT AES PCID XSAVE OSXSAVE SEGLIM64 TSCTMR AVX1.0 RDRAND F16C'
   b'machdep.cpu.leaf7_features: RDWRFSGS TSC_THREAD_OFFSET BMI1 AVX2 SMEP BMI2 
ERMS INVPCID FPU_CSDS RDSEED ADX SMAP IPT MDCLEAR IBRS STIBP L1DF SSBD'
   b'machdep.cpu.extfeatures: SYSCALL XD 1GBPAGE EM64T LAHF LZCNT PREFETCHW 
RDTSCP TSCI'
   ----------Network Test----------
   Setting timeout: 10
   Timing for MXNet: https://github.com/apache/incubator-mxnet, DNS: 0.0810 
sec, LOAD: 0.7415 sec.
   Timing for GluonNLP GitHub: https://github.com/dmlc/gluon-nlp, DNS: 0.0005 
sec, LOAD: 0.9921 sec.
   Timing for GluonNLP: http://gluon-nlp.mxnet.io, DNS: 0.1026 sec, LOAD: 
0.6413 sec.
   Timing for D2L: http://d2l.ai, DNS: 0.0870 sec, LOAD: 0.0906 sec.
   Timing for D2L (zh-cn): http://zh.d2l.ai, DNS: 0.0644 sec, LOAD: 0.2654 sec.
   Timing for FashionMNIST: 
https://repo.mxnet.io/gluon/dataset/fashion-mnist/train-labels-idx1-ubyte.gz, 
DNS: 0.1016 sec, LOAD: 0.9229 sec.
   Timing for PYPI: https://pypi.python.org/pypi/pip, DNS: 0.0655 sec, LOAD: 
0.9689 sec.
   Timing for Conda: https://repo.continuum.io/pkgs/free/, DNS: 0.0689 sec, 
LOAD: 0.2002 sec.
   ```
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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