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/20 05:43:50 UTC
[GitHub] feevos commented on issue #9138: I cannot make mxnet.ndarray.UpSampling work with bilinear interpolation
feevos commented on issue #9138: I cannot make mxnet.ndarray.UpSampling work with bilinear interpolation
URL: https://github.com/apache/incubator-mxnet/issues/9138#issuecomment-352970466
@chowkamlee81 Thank you very much for your answer. I tried this with ndarray instead (the operator UpSampling exists for both ndarray and Symbol) and it doesn't work:
```Python
xx = nd.random_normal(shape=[2,16,256,256],ctx=mx.cpu())
temp = nd.UpSampling(xx, num_filter=1, scale=2, sample_type='bilinear', num_args=2,name="upsampling1")
```
## Error message:
```Python
MXNetError Traceback (most recent call last)
<ipython-input-6-b234addee343> in <module>()
1 xx = nd.random_normal(shape=[2,16,256,256],ctx=mx.cpu())
----> 2 temp = nd.UpSampling(xx, num_filter=1, scale=2, sample_type='bilinear', num_args=2,name="upsampling1")
/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: [13:39: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) [0x7fde399d6a1c]
[bt] (1) /home/dia021/anaconda2/lib/python2.7/site-packages/mxnet/libmxnet.so(+0x240538f) [0x7fde3bb5238f]
[bt] (2) /home/dia021/anaconda2/lib/python2.7/site-packages/mxnet/libmxnet.so(+0x24029a2) [0x7fde3bb4f9a2]
[bt] (3) /home/dia021/anaconda2/lib/python2.7/site-packages/mxnet/libmxnet.so(MXImperativeInvokeEx+0x63) [0x7fde3bb4ffb3]
[bt] (4) /home/dia021/anaconda2/lib/python2.7/lib-dynload/_ctypes.so(ffi_call_unix64+0x4c) [0x7fde7725657c]
[bt] (5) /home/dia021/anaconda2/lib/python2.7/lib-dynload/_ctypes.so(ffi_call+0x1f5) [0x7fde77255cd5]
[bt] (6) /home/dia021/anaconda2/lib/python2.7/lib-dynload/_ctypes.so(_ctypes_callproc+0x3e6) [0x7fde7724d376]
[bt] (7) /home/dia021/anaconda2/lib/python2.7/lib-dynload/_ctypes.so(+0x9db3) [0x7fde77244db3]
[bt] (8) /home/dia021/anaconda2/bin/../lib/libpython2.7.so.1.0(PyObject_Call+0x53) [0x7fde7c2d6e93]
[bt] (9) /home/dia021/anaconda2/bin/../lib/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x715d) [0x7fde7c38980d]
```
it seems it expects a different kind of input (also weights of some sort? and if yes, what dimensionality?)
from here:
```Python
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.
```
I do not understand how to solve this.
----------------------------------------------------------------
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