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 2017/12/19 09:23:43 UTC
[GitHub] feevos opened a new issue #9138: I cannot make mxnet.ndarray.UpSampling work with bilinear interpolation
feevos opened a new issue #9138: I cannot make mxnet.ndarray.UpSampling work with bilinear interpolation
URL: https://github.com/apache/incubator-mxnet/issues/9138
## Description
Dear all, when I run UpSampling (python) with nearest interpolation, everything goes normal:
```Python
nfilters = 16
xx = nd.random_normal(shape=[2,nfilters,64,64],ctx=mx.cpu())
print xx.asnumpy().shape
temp = nd.UpSampling(xx,scale=2,sample_type='nearest')
print temp.asnumpy().shape
```
when I try to perform sample_type = 'bilinear' I get errors:
```Python
nfilters = 16
xx = nd.random_normal(shape=[2,nfilters,64,64],ctx=mx.cpu())
print xx.asnumpy().shape
temp = nd.UpSampling(xx,scale=2,sample_type='bilinear')
print temp.asnumpy().shape
```
any pointers/ideas on what I am doing wrong? I need it to work correctly for both ndarray and mx.sym (but I assume should be the same for both).
Thank you
## Error Message:
```Python
---------------------------------------------------------------------------
MXNetError Traceback (most recent call last)
<ipython-input-57-7b8d60ea54bb> in <module>()
3 xx = nd.random_normal(shape=[2,nfilters,64,64],ctx=mx.cpu())
4 print xx.asnumpy().shape
----> 5 temp = mx.nd.UpSampling(xx,scale=2,sample_type='bilinear')
6 print temp.asnumpy().shape
/home/dia021/anaconda2/lib/python2.7/site-packages/mxnet/ndarray/register.pyc in UpSampling(*data, **kwargs)
/home/dia021/anaconda2/lib/python2.7/site-packages/mxnet/_ctypes/ndarray.pyc in _imperative_invoke(handle, ndargs, keys, vals, out)
90 c_str_array(keys),
91 c_str_array([str(s) for s in vals]),
---> 92 ctypes.byref(out_stypes)))
93
94 if original_output is not None:
/home/dia021/anaconda2/lib/python2.7/site-packages/mxnet/base.pyc in check_call(ret)
144 """
145 if ret != 0:
--> 146 raise MXNetError(py_str(_LIB.MXGetLastError()))
147
148
MXNetError: [17:20:11] src/c_api/../imperative/imperative_utils.h:303: Check failed: num_inputs == infered_num_inputs (1 vs. 2) Operator UpSampling expects 2 inputs, but got 1 instead.
Stack trace returned 10 entries:
[bt] (0) /home/dia021/anaconda2/lib/python2.7/site-packages/mxnet/libmxnet.so(+0x289a1c) [0x7fe0ed9d6a1c]
[bt] (1) /home/dia021/anaconda2/lib/python2.7/site-packages/mxnet/libmxnet.so(+0x240538f) [0x7fe0efb5238f]
[bt] (2) /home/dia021/anaconda2/lib/python2.7/site-packages/mxnet/libmxnet.so(+0x24029a2) [0x7fe0efb4f9a2]
[bt] (3) /home/dia021/anaconda2/lib/python2.7/site-packages/mxnet/libmxnet.so(MXImperativeInvokeEx+0x63) [0x7fe0efb4ffb3]
[bt] (4) /home/dia021/anaconda2/lib/python2.7/lib-dynload/_ctypes.so(ffi_call_unix64+0x4c) [0x7fe12e6dd57c]
[bt] (5) /home/dia021/anaconda2/lib/python2.7/lib-dynload/_ctypes.so(ffi_call+0x1f5) [0x7fe12e6dccd5]
[bt] (6) /home/dia021/anaconda2/lib/python2.7/lib-dynload/_ctypes.so(_ctypes_callproc+0x3e6) [0x7fe12e6d4376]
[bt] (7) /home/dia021/anaconda2/lib/python2.7/lib-dynload/_ctypes.so(+0x9db3) [0x7fe12e6cbdb3]
[bt] (8) /home/dia021/anaconda2/bin/../lib/libpython2.7.so.1.0(PyObject_Call+0x53) [0x7fe13375de93]
[bt] (9) /home/dia021/anaconda2/bin/../lib/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x715d) [0x7fe13381080d]
```
----------------------------------------------------------------
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