{"action":"closed","issue":{"url":"https://api.github.com/repos/apache/incubator-mxnet/issues/9138","repository_url":"https://api.github.com/repos/apache/incubator-mxnet","labels_url":"https://api.github.com/repos/apache/incubator-mxnet/issues/9138/labels{/name}","comments_url":"https://api.github.com/repos/apache/incubator-mxnet/issues/9138/comments","events_url":"https://api.github.com/repos/apache/incubator-mxnet/issues/9138/events","html_url":"https://github.com/apache/incubator-mxnet/issues/9138","id":283156025,"number":9138,"title":"I cannot make mxnet.ndarray.UpSampling work with bilinear interpolation","user":{"login":"feevos","id":14290519,"avatar_url":"https://avatars0.githubusercontent.com/u/14290519?v=4","gravatar_id":"","url":"https://api.github.com/users/feevos","html_url":"https://github.com/feevos","followers_url":"https://api.github.com/users/feevos/followers","following_url":"https://api.github.com/users/feevos/following{/other_user}","gists_url":"https://api.github.com/users/feevos/gists{/gist_id}","starred_url":"https://api.github.com/users/feevos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/feevos/subscriptions","organizations_url":"https://api.github.com/users/feevos/orgs","repos_url":"https://api.github.com/users/feevos/repos","events_url":"https://api.github.com/users/feevos/events{/privacy}","received_events_url":"https://api.github.com/users/feevos/received_events","type":"User","site_admin":false},"labels":[{"id":588394144,"url":"https://api.github.com/repos/apache/incubator-mxnet/labels/Doc","name":"Doc","color":"5319e7","default":false},{"id":707556574,"url":"https://api.github.com/repos/apache/incubator-mxnet/labels/Operator","name":"Operator","color":"fbca04","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2017-12-19T09:23:41Z","updated_at":"2018-04-09T21:09:55Z","closed_at":"2018-04-09T21:09:55Z","author_association":"NONE","body":"## Description\r\nDear all, when I run UpSampling (python, mxnet.__version__ == 1.0.0) with nearest interpolation, everything goes normal: \r\n```Python\r\nnfilters = 16\r\nxx = nd.random_normal(shape=[2,nfilters,64,64],ctx=mx.cpu())\r\nprint xx.asnumpy().shape\r\ntemp = nd.UpSampling(xx,scale=2,sample_type='nearest')\r\nprint temp.asnumpy().shape\r\n```\r\n\r\nwhen I try to perform sample_type = 'bilinear' I get errors: \r\n```Python\r\nnfilters = 16\r\nxx = nd.random_normal(shape=[2,nfilters,64,64],ctx=mx.cpu())\r\nprint xx.asnumpy().shape\r\ntemp = nd.UpSampling(xx,scale=2,sample_type='bilinear')\r\nprint temp.asnumpy().shape\r\n```\r\nany 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). \r\n\r\nThank you\r\n\r\n\r\n## Error Message:\r\n```Python\r\n---------------------------------------------------------------------------\r\nMXNetError                                Traceback (most recent call last)\r\n<ipython-input-57-7b8d60ea54bb> in <module>()\r\n      3 xx = nd.random_normal(shape=[2,nfilters,64,64],ctx=mx.cpu())\r\n      4 print xx.asnumpy().shape\r\n----> 5 temp = mx.nd.UpSampling(xx,scale=2,sample_type='bilinear')\r\n      6 print temp.asnumpy().shape\r\n\r\n/home/dia021/anaconda2/lib/python2.7/site-packages/mxnet/ndarray/register.pyc in UpSampling(*data, **kwargs)\r\n\r\n/home/dia021/anaconda2/lib/python2.7/site-packages/mxnet/_ctypes/ndarray.pyc in _imperative_invoke(handle, ndargs, keys, vals, out)\r\n     90         c_str_array(keys),\r\n     91         c_str_array([str(s) for s in vals]),\r\n---> 92         ctypes.byref(out_stypes)))\r\n     93 \r\n     94     if original_output is not None:\r\n\r\n/home/dia021/anaconda2/lib/python2.7/site-packages/mxnet/base.pyc in check_call(ret)\r\n    144     \"\"\"\r\n    145     if ret != 0:\r\n--> 146         raise MXNetError(py_str(_LIB.MXGetLastError()))\r\n    147 \r\n    148 \r\n\r\nMXNetError: [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.\r\n\r\nStack trace returned 10 entries:\r\n[bt] (0) /home/dia021/anaconda2/lib/python2.7/site-packages/mxnet/libmxnet.so(+0x289a1c) [0x7fe0ed9d6a1c]\r\n[bt] (1) /home/dia021/anaconda2/lib/python2.7/site-packages/mxnet/libmxnet.so(+0x240538f) [0x7fe0efb5238f]\r\n[bt] (2) /home/dia021/anaconda2/lib/python2.7/site-packages/mxnet/libmxnet.so(+0x24029a2) [0x7fe0efb4f9a2]\r\n[bt] (3) /home/dia021/anaconda2/lib/python2.7/site-packages/mxnet/libmxnet.so(MXImperativeInvokeEx+0x63) [0x7fe0efb4ffb3]\r\n[bt] (4) /home/dia021/anaconda2/lib/python2.7/lib-dynload/_ctypes.so(ffi_call_unix64+0x4c) [0x7fe12e6dd57c]\r\n[bt] (5) /home/dia021/anaconda2/lib/python2.7/lib-dynload/_ctypes.so(ffi_call+0x1f5) [0x7fe12e6dccd5]\r\n[bt] (6) /home/dia021/anaconda2/lib/python2.7/lib-dynload/_ctypes.so(_ctypes_callproc+0x3e6) [0x7fe12e6d4376]\r\n[bt] (7) /home/dia021/anaconda2/lib/python2.7/lib-dynload/_ctypes.so(+0x9db3) [0x7fe12e6cbdb3]\r\n[bt] (8) /home/dia021/anaconda2/bin/../lib/libpython2.7.so.1.0(PyObject_Call+0x53) [0x7fe13375de93]\r\n[bt] (9) /home/dia021/anaconda2/bin/../lib/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x715d) [0x7fe13381080d]\r\n\r\n```\r\n\r\n"}}
{"actor":{"display_login":"szha"}}