{"action":"created","issue":{"url":"https://api.github.com/repos/onnx/onnx/issues/1655","repository_url":"https://api.github.com/repos/onnx/onnx","labels_url":"https://api.github.com/repos/onnx/onnx/issues/1655/labels{/name}","comments_url":"https://api.github.com/repos/onnx/onnx/issues/1655/comments","events_url":"https://api.github.com/repos/onnx/onnx/issues/1655/events","html_url":"https://github.com/onnx/onnx/issues/1655","id":385128993,"node_id":"MDU6SXNzdWUzODUxMjg5OTM=","number":1655,"title":"Got error with upsampling operation","user":{"login":"ht-alchera","id":43237639,"node_id":"MDQ6VXNlcjQzMjM3NjM5","avatar_url":"https://avatars2.githubusercontent.com/u/43237639?v=4","gravatar_id":"","url":"https://api.github.com/users/ht-alchera","html_url":"https://github.com/ht-alchera","followers_url":"https://api.github.com/users/ht-alchera/followers","following_url":"https://api.github.com/users/ht-alchera/following{/other_user}","gists_url":"https://api.github.com/users/ht-alchera/gists{/gist_id}","starred_url":"https://api.github.com/users/ht-alchera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ht-alchera/subscriptions","organizations_url":"https://api.github.com/users/ht-alchera/orgs","repos_url":"https://api.github.com/users/ht-alchera/repos","events_url":"https://api.github.com/users/ht-alchera/events{/privacy}","received_events_url":"https://api.github.com/users/ht-alchera/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2018-11-28T07:02:02Z","updated_at":"2018-12-24T04:06:08Z","closed_at":"2018-12-14T05:55:15Z","author_association":"NONE","body":"my implementation is below..\r\n```\r\nimport onnx\r\nfrom onnx import helper\r\nfrom onnx import TensorProto\r\n\r\nimport numpy as np\r\n\r\ndata = np.array([[[\r\n    [1, 2],\r\n    [3, 4],\r\n]]], dtype=np.float32)\r\n\r\nscales = np.array([1.0, 1.0, 2.0, 3.0], dtype=np.float32)\r\n\r\ninputs = list()\r\ninput_tensor = helper.make_tensor_value_info(\r\n    'x', TensorProto.FLOAT, data.shape)\r\nscale_tensor = helper.make_tensor_value_info(\r\n    'scales', TensorProto.FLOAT, (4,))\r\ninputs.append(input_tensor)\r\ninputs.append(scale_tensor)\r\n\r\ninitializers = list()\r\ninitializers.append(helper.make_tensor('scales', TensorProto.FLOAT, scales.shape, scales))\r\n\r\ngraph = helper.make_graph(\r\n            nodes=[helper.make_node(\"Upsample\", ['x', 'scales'], ['y'])],\r\n            name='UPSAMPLE-TEST',\r\n            inputs=inputs,\r\n            outputs=[],\r\n            initializer=initializers)\r\n\r\nmodel_def = helper.make_model(graph)\r\nonnx.checker.check_model(model_def)\r\n```\r\n\r\nand I got the output\r\n\r\n```\r\nonnx.onnx_cpp2py_export.checker.ValidationError: Input size 2 not in range [min=1, max=1].\r\n\r\n==> Context: Bad node spec: input: \"x\" input: \"scales\" output: \"y\" op_type: \"Upsample\"\r\n```\r\n\r\nI can't understand error message..any hint?\r\nThanks!\r\n\r\nmy onnx version is 1.3.0 with python 2.7.15."},"comment":{"url":"https://api.github.com/repos/onnx/onnx/issues/comments/449683516","html_url":"https://github.com/onnx/onnx/issues/1655#issuecomment-449683516","issue_url":"https://api.github.com/repos/onnx/onnx/issues/1655","id":449683516,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0OTY4MzUxNg==","user":{"login":"YueshangGu","id":23735398,"node_id":"MDQ6VXNlcjIzNzM1Mzk4","avatar_url":"https://avatars2.githubusercontent.com/u/23735398?v=4","gravatar_id":"","url":"https://api.github.com/users/YueshangGu","html_url":"https://github.com/YueshangGu","followers_url":"https://api.github.com/users/YueshangGu/followers","following_url":"https://api.github.com/users/YueshangGu/following{/other_user}","gists_url":"https://api.github.com/users/YueshangGu/gists{/gist_id}","starred_url":"https://api.github.com/users/YueshangGu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/YueshangGu/subscriptions","organizations_url":"https://api.github.com/users/YueshangGu/orgs","repos_url":"https://api.github.com/users/YueshangGu/repos","events_url":"https://api.github.com/users/YueshangGu/events{/privacy}","received_events_url":"https://api.github.com/users/YueshangGu/received_events","type":"User","site_admin":false},"created_at":"2018-12-24T04:06:08Z","updated_at":"2018-12-24T04:06:08Z","author_association":"NONE","body":"@xxradon I remove the protobuf installed by apt-get install, and in camke output it should use the protobuf in anaconda, but I still get the error above.\r\n\r\ncmake output\r\n```\r\nrunning install\r\nrunning bdist_egg\r\nrunning egg_info\r\nwriting requirements to onnx.egg-info/requires.txt\r\nwriting onnx.egg-info/PKG-INFO\r\nwriting top-level names to onnx.egg-info/top_level.txt\r\nwriting dependency_links to onnx.egg-info/dependency_links.txt\r\nwriting entry points to onnx.egg-info/entry_points.txt\r\nreading manifest file 'onnx.egg-info/SOURCES.txt'\r\nreading manifest template 'MANIFEST.in'\r\nwriting manifest file 'onnx.egg-info/SOURCES.txt'\r\ninstalling library code to build/bdist.linux-x86_64/egg\r\nrunning install_lib\r\nrunning build_py\r\nrunning create_version\r\nrunning cmake_build\r\n-- Found Protobuf: /home/kai/anaconda2/lib/libprotobuf.so (found version \"3.5.1\")\r\n--\r\n-- ******** Summary ********\r\n--   CMake version         : 3.13.1\r\n--   CMake command         : /usr/local/bin/cmake\r\n--   System                : Linux\r\n--   C++ compiler          : /usr/bin/c++\r\n--   C++ compiler version  : 5.4.0\r\n--   CXX flags             :  -Wnon-virtual-dtor\r\n--   Build type            : Release\r\n--   Compile definitions   :\r\n--   CMAKE_PREFIX_PATH     :\r\n--   CMAKE_INSTALL_PREFIX  : /usr/local\r\n--   CMAKE_MODULE_PATH     : /home/kai/anaconda2/share/cmake/pybind11\r\n--\r\n--   ONNX version          : 1.3.0\r\n--   ONNX NAMESPACE        : onnx\r\n--   ONNX_BUILD_TESTS      : OFF\r\n--   ONNX_BUILD_BENCHMARKS : OFF\r\n--   ONNX_USE_LITE_PROTO   : OFF\r\n--   ONNXIFI_DUMMY_BACKEND : OFF\r\n--\r\n--   Protobuf compiler     : /home/kai/anaconda2/bin/protoc\r\n--   Protobuf includes     : /home/kai/anaconda2/include\r\n--   Protobuf libraries    : /home/kai/anaconda2/lib/libprotobuf.so\r\n--   BUILD_ONNX_PYTHON     : ON\r\n--     Python version      :\r\n--     Python executable   : /home/kai/anaconda2/bin/python\r\n--     Python includes     : /home/kai/anaconda2/include/python2.7\r\n-- Configuring done\r\n-- Generating done\r\n-- Build files have been written to: /mnt/d/onnx/.setuptools-cmake-build\r\n```\r\nmore info\r\n```\r\nkai@4CV80654G5:/mnt/d$ which protoc\r\n/home/kai/anaconda2/bin/protoc\r\nkai@4CV80654G5:/mnt/d$ whereis protoc\r\nprotoc: /home/kai/anaconda2/bin/protoc\r\nkai@4CV80654G5:/mnt/d$ conda list | grep proto\r\nlibprotobuf               3.5.2                hd28b015_1    conda-forge\r\nprotobuf                  3.5.2            py27hd28b015_0    conda-forge\r\n```"}}
{"actor":{"display_login":"YueshangGu"}}