zhreshold / cvpr2020-videomodeling-deployment Goto Github PK
View Code? Open in Web Editor NEWMaterials for demonstrating video model deployment
Materials for demonstrating video model deployment
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
Hi,
I am trying to convert slowfast_4x16_resnet50_kinetics400 to TVM using the below notebook:
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)
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.