Giter Site home page Giter Site logo

cvpr2020-videomodeling-deployment's People

Contributors

zhreshold avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

cvpr2020-videomodeling-deployment's Issues

cannot open shared object file

Hi @zhreshold

I tried fine tuning the slowfast model on two classes and trying to load the export_tvm model .so, .param, json all the files but getting the below error:

./video_classification abseiling_k400.mp4 slowfast_4x16_resnet50_custom --gpu 0
terminate called after throwing an instance of 'dmlc::Error'
what(): deployment/tvm_deploy/./tvm/src/runtime/dso_library.cc:79: Check failed: lib_handle_ != nullptr: Failed to load dynamic shared library slowfast_4x16_resnet50_custom_deploy_lib.so slowfast_4x16_resnet50_custom_deploy_lib.so: cannot open shared object file: No such file or directory
Stack trace:
[bt] (0) ./video_classification(+0xc20c) [0x558e51820c]
[bt] (1) ./video_classification(+0x18c20) [0x558e524c20]
[bt] (2) ./video_classification(+0x11c10) [0x558e51dc10]
[bt] (3) ./video_classification(+0x56200) [0x558e562200]
[bt] (4) ./video_classification(+0xb718) [0x558e517718]
[bt] (5) /lib/aarch64-linux-gnu/libc.so.6(__libc_start_main+0xe0) [0x7f9d5c3720]
[bt] (6) ./video_classification(+0xb870) [0x558e517870]
Aborted (core dumped)

Thanks

IndexError: Index out of range. size: 4, got index 4

Hi,

I am trying to convert slowfast_4x16_resnet50_kinetics400 to TVM using the below notebook:

https://github.com/zhreshold/cvpr2020-videomodeling-deployment/blob/master/03_deploy_video_model_to_tvm.ipynb

But getting below error in line:

gcv.utils.export_tvm(model_name, net, data_shape=(1, 3, 224, 224), preprocess=TvmPreprocess(),
target='cuda', ctx=mx.gpu(0), opt_level=3, use_autotvm=False)

Error:

IndexError Traceback (most recent call last)
in
1 gcv.utils.export_tvm(model_name, net, data_shape=(1, 3, 224, 224), preprocess=TvmPreprocess(),
----> 2 target='cuda', ctx=mx.gpu(0), opt_level=3, use_autotvm=False)

~/archiconda3/envs/mx1.7/lib/python3.6/site-packages/gluoncv/utils/export_helper.py in export_tvm(path, block, data_shape, epoch, preprocess, layout, ctx, target, opt_level, use_autotvm)
227
228 # convert to relay graph
--> 229 sym, params = relay.frontend.from_mxnet(wrapper_block, shape={"data": data_shape})
230
231 if use_autotvm:

~/archiconda3/envs/mx1.7/lib/python3.6/site-packages/tvm-0.8.dev245+gb2e418cb1-py3.6-linux-aarch64.egg/tvm/relay/frontend/mxnet.py in from_mxnet(symbol, shape, dtype, arg_params, aux_params)
2881 sym = mx.sym.Group(sym)
2882 shape, dtype = _update_shape_dtype(shape, dtype, params)
-> 2883 func = _from_mxnet_impl(sym, shape, dtype, params, mod)
2884 elif isinstance(symbol, mx.gluon.Block):
2885 raise NotImplementedError("Only Hybrid Blocks are supported now.")

~/archiconda3/envs/mx1.7/lib/python3.6/site-packages/tvm-0.8.dev245+gb2e418cb1-py3.6-linux-aarch64.egg/tvm/relay/frontend/mxnet.py in _from_mxnet_impl(symbol, shape_dict, dtype_info, params, mod)
2790 assert op_name in _convert_map
2791 op_params = _get_op_params(children, attrs, op_name, node, params)
-> 2792 res = _convert_mapop_name
2793 if res is None:
2794 # defer conversion, used in RNN state initialization

~/archiconda3/envs/mx1.7/lib/python3.6/site-packages/tvm-0.8.dev245+gb2e418cb1-py3.6-linux-aarch64.egg/tvm/relay/frontend/mxnet.py in _mx_slice(inputs, attrs)
509 for i, ed in enumerate(end):
510 if ed is None:
--> 511 end[i] = input_shape[i]
512 new_attrs = {"begin": list(begin), "end": list(end)}
513 if stride is not None:

~/archiconda3/envs/mx1.7/lib/python3.6/site-packages/tvm-0.8.dev245+gb2e418cb1-py3.6-linux-aarch64.egg/tvm/ir/container.py in getitem(self, idx)
34
35 def getitem(self, idx):
---> 36 return getitem_helper(self, _ffi_node_api.ArrayGetItem, len(self), idx)
37
38 def len(self):

~/archiconda3/envs/mx1.7/lib/python3.6/site-packages/tvm-0.8.dev245+gb2e418cb1-py3.6-linux-aarch64.egg/tvm/runtime/container.py in getitem_helper(obj, elem_getter, length, idx)
55
56 if idx < -length or idx >= length:
---> 57 raise IndexError("Index out of range. size: {}, got index {}".format(length, idx))
58 if idx < 0:
59 idx += length

IndexError: Index out of range. size: 4, got index 4

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.