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/08 20:25:31 UTC
[GitHub] arogozhnikov opened a new issue #12761: Shape_array returns random
numbers
arogozhnikov opened a new issue #12761: Shape_array returns random numbers
URL: https://github.com/apache/incubator-mxnet/issues/12761
## Minimum reproducible example
```python
import mxnet as mx
x = mx.sym.Variable('x', shape=(2, 3, 4), dtype='float32')
print(x, x.infer_shape(), x.infer_type())
shape = x.shape_array()
print(shape, shape.infer_shape(), shape.infer_type())
x_computed = x.bind(mx.cpu(), args={x.name: mx.nd.zeros((2, 3, 4), dtype='float32')})
print('x_computed', x_computed.outputs)
# this last one is the only that looks absolutely wrong
shape_computed = shape.bind(mx.cpu(), args={x.name: mx.nd.zeros((2, 3, 4), dtype='float32')})
print('shape_computed', shape_computed.outputs)
```
## Output
```
<Symbol x> ([(2, 3, 4)], [(2, 3, 4)], []) ([<class 'numpy.float32'>], [<class 'numpy.float32'>], [])
<Symbol shape_array4> ([(2, 3, 4)], [(3,)], []) ([<class 'numpy.float32'>], [<class 'numpy.int64'>], [])
x_computed [
[[[0. 0. 0. 0.]
[0. 0. 0. 0.]
[0. 0. 0. 0.]]
[[0. 0. 0. 0.]
[0. 0. 0. 0.]
[0. 0. 0. 0.]]]
<NDArray 2x3x4 @cpu(0)>]
shape_computed [
[57812800 60809616 0]
<NDArray 3 @cpu(0)>]
```
## Environment info (Required)
```
----------Python Info----------
Version : 3.6.6
Compiler : GCC 8.0.1 20180414 (experimental) [trunk revision 259383
Build : ('default', 'Sep 12 2018 18:26:19')
Arch : ('64bit', 'ELF')
------------Pip Info-----------
Version : 9.0.1
Directory : /home/axelr/py36/lib/python3.6/site-packages/pip
----------MXNet Info-----------
/home/axelr/py36/lib/python3.6/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.3.0
Directory : /home/axelr/py36/lib/python3.6/site-packages/mxnet
Commit Hash : b3be92f4a48bce62a5a8424271871c2f81c8f7f1
----------System Info----------
Platform : Linux-4.15.0-34-generic-x86_64-with-Ubuntu-18.04-bionic
system : Linux
node : axelr-mi
release : 4.15.0-34-generic
version : #37-Ubuntu SMP Mon Aug 27 15:21:48 UTC 2018
----------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): 8
On-line CPU(s) list: 0-7
Thread(s) per core: 2
Core(s) per socket: 4
Socket(s): 1
NUMA node(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 142
Model name: Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz
Stepping: 10
CPU MHz: 2898.701
CPU max MHz: 3400,0000
CPU min MHz: 400,0000
BogoMIPS: 3600.00
Virtualization: VT-x
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 6144K
NUMA node0 CPU(s): 0-7
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 cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp flush_l1d
----------Network Test----------
Setting timeout: 10
Timing for MXNet: https://github.com/apache/incubator-mxnet, DNS: 0.1668 sec, LOAD: 1.3190 sec.
Timing for Gluon Tutorial(en): http://gluon.mxnet.io, DNS: 0.3223 sec, LOAD: 1.1982 sec.
Timing for Gluon Tutorial(cn): https://zh.gluon.ai, DNS: 0.3219 sec, LOAD: 0.8873 sec.
Timing for FashionMNIST: https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/gluon/dataset/fashion-mnist/train-labels-idx1-ubyte.gz, DNS: 0.5142 sec, LOAD: 0.8523 sec.
Timing for PYPI: https://pypi.python.org/pypi/pip, DNS: 0.0851 sec, LOAD: 2.0172 sec.
Timing for Conda: https://repo.continuum.io/pkgs/free/, DNS: 0.0953 sec, LOAD: 0.7958 sec.
```
----------------------------------------------------------------
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