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/29 09:25:06 UTC

[GitHub] xinyu-intel opened a new issue #11086: Infer shape error with softmaxoutput

xinyu-intel opened a new issue #11086: Infer shape error with softmaxoutput
URL: https://github.com/apache/incubator-mxnet/issues/11086
 
 
   ## Description
   softmaxoutput cannot handle a special topology `1*1 conv + softmax` which can be used to replace fully connect in some networks.
   
   I wrote a similar softmax script with 4D input data and 1D label to trigger this error.
   
   ## Environment info (Required)
   
   ```
   ----------Python Info----------
   ('Version      :', '2.7.14')
   ('Compiler     :', 'GCC 4.8.2 20140120 (Red Hat 4.8.2-15)')
   ('Build        :', ('default', 'Oct 16 2017 16:29:56'))
   ('Arch         :', ('64bit', 'ELF'))
   ------------Pip Info-----------
   ('Version      :', '9.0.1')
   ('Directory    :', '/home/chenxiny/anaconda3/envs/py27/lib/python2.7/site-packages/pip')
   ----------MXNet Info-----------
   /home/chenxiny/anaconda3/envs/py27/lib/python2.7/site-packages/h5py/__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
     from ._conv import register_converters as _register_converters
   ('Version      :', '1.2.0')
   ('Directory    :', '/home/chenxiny/incubator-mxnet-xinyu/python/mxnet')
   Hashtag not found. Not installed from pre-built package.
   ----------System Info----------
   ('Platform     :', 'Linux-3.10.0-693.el7.x86_64-x86_64-with-centos-7.4.1708-Core')
   ('system       :', 'Linux')
   ('node         :', '`')
   ('release      :', '3.10.0-693.el7.x86_64')
   ('version      :', '#1 SMP Tue Aug 22 21:09:27 UTC 2017')
   ----------Hardware Info----------
   ('machine      :', 'x86_64')
   ('processor    :', 'x86_64')
   Architecture:          x86_64
   CPU op-mode(s):        32-bit, 64-bit
   Byte Order:            Little Endian
   CPU(s):                80
   On-line CPU(s) list:   0-79
   Thread(s) per core:    2
   Core(s) per socket:    20
   Socket(s):             2
   NUMA node(s):          2
   Vendor ID:             GenuineIntel
   CPU family:            6
   Model:                 85
   Model name:            Intel(R) Xeon(R) Gold 6148 CPU @ 2.40GHz
   Stepping:              4
   CPU MHz:               1127.906
   CPU max MHz:           3700.0000
   CPU min MHz:           1000.0000
   BogoMIPS:              4800.00
   Virtualization:        VT-x
   L1d cache:             32K
   L1i cache:             32K
   L2 cache:              1024K
   L3 cache:              28160K
   NUMA node0 CPU(s):     0-19,40-59
   NUMA node1 CPU(s):     20-39,60-79
   Flags:                 fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch epb cat_l3 cdp_l3 intel_pt tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm cqm mpx rdt_a avx512f avx512dq rdseed adx smap clflushopt clwb avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local dtherm ida arat pln pts hwp hwp_act_window hwp_epp hwp_pkg_req
   ----------Network Test----------
   Setting timeout: 10
   Timing for MXNet: https://github.com/apache/incubator-mxnet, DNS: 0.0050 sec, LOAD: 1.2752 sec.
   Timing for PYPI: https://pypi.python.org/pypi/pip, DNS: 0.0020 sec, LOAD: 2.9736 sec.
   Timing for FashionMNIST: https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/gluon/dataset/fashion-mnist/train-labels-idx1-ubyte.gz, DNS: 0.0085 sec, LOAD: 0.8832 sec.
   Timing for Conda: https://repo.continuum.io/pkgs/free/, DNS: 0.0074 sec, LOAD: 0.7266 sec.
   Timing for Gluon Tutorial(en): http://gluon.mxnet.io, DNS: 0.2947 sec, LOAD: 2.7869 sec.
   Error open Gluon Tutorial(cn): https://zh.gluon.ai, <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:661)>, DNS finished in 0.135751008987 sec.
   ```
   
   Package used (Python/R/Scala/Julia):
   (I'm using python)
   
   ## Build info (Required if built from source)
   
   Compiler (gcc/clang/mingw/visual studio):gcc
   
   MXNet commit hash:
   `63e43a33ff3ce9e53c3b7ab7182d41c976a7fecc`
   
   
   ## Error Message:
   ```
   inshape at(0) [4,4,1,1]
   inshape at(1) [4]
   softmax dshape dim 4
   softmax shape 4 4 1 1
   dshape [4,4,1,1] kLabel 1
   (*in_shape)[softmaxout_enum::kLabel] [4]
   Provided [4] Infered [4,4,1]
   Traceback (most recent call last):
     File "test3.py", line 8, in <module>
       print(sym.bind(mx.cpu(),{'x': mx.nd.array(data), 'y': mx.nd.array(label)}).forward()[0].asnumpy())
     File "/home/chenxiny/incubator-mxnet-xinyu/python/mxnet/symbol/symbol.py", line 1702, in bind
       ctypes.byref(handle)))
     File "/home/chenxiny/incubator-mxnet-xinyu/python/mxnet/base.py", line 210, in check_call
       raise MXNetError(py_str(_LIB.MXGetLastError()))
   mxnet.base.MXNetError: Error in operator softmaxoutput0: Shape inconsistent, Provided = [4], inferred shape=[4,4,1]
   ```
   ## Minimum reproducible example
   ```
     1 import mxnet as mx
     2 
     3 x = mx.sym.Variable('x')
     4 y = mx.sym.Variable('y')
     5 data = [[[[1]],[[2]],[[3]],[[4]]],[[[2]],[[2]],[[2]],[[2]]],[[[3]],[[3]],[[3]],[[3]]],[[[4]],[[4]],[[4]],[[4]]]]
     6 label = [1,0,2,3]
     7 sym = mx.symbol.SoftmaxOutput(data=x, label = y, multi_output=False)
     8 print(sym.bind(mx.cpu(),{'x': mx.nd.array(data), 'y': mx.nd.array(label)}).forward()[0].asnumpy())
   ```
   
   @pengzhao-intel

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