Naming convention for start_name and stop_name

Hi All,

I am following the tutorial instruction “Deploy Pretrained Vision Model from MxNet on VTA”. The sample program runs perfectly. Then I am trying to use other model( mobileNet1.0) from MxNet. I’ve modified the code, by changing the pack_dict to

pack_dict = {"mobilenet1.0": ["nn.conv2d", "nn.dense"]}

also changed the model to

model = "mobilenet1.0"

But, I am getting an “AssertionError”. I am not sure that my naming convention is correct. Where do I find the naming convention for the start_name and stop_name if I want to use other models from MxNet, or even if I build my own model using API from MxNet. Is there any documentation that I can follow? Thanks !

Following is the error message:

File "deploy_vision_on_vta.py", line 191, in <module>
stop_name=pack_dict[model][1])

File "/harddisk1/xxxx/Projects/TVM_Projects/tvm/vta/python/vta/top/graphpack.py", line 328, in graph_pack
expr = packer.visit(expr)

File "/harddisk1/xxxx/.local/lib/python3.6/site-packages/tvm-0.6.0-py3.6-linux-x86_64.egg/tvm/relay/expr_functor.py", line 43, in visit
res = self.visit_function(expr)

File "/harddisk1/xxxx/.local/lib/python3.6/site-packages/tvm-0.6.0-py3.6-linux-x86_64.egg/tvm/relay/expr_functor.py", line 199, in visit_function
new_body = self.visit(fn.body)

File "/harddisk1/xxx/.local/lib/python3.6/site-packages/tvm-0.6.0-py3.6-linux-x86_64.egg/tvm/relay/expr_functor.py", line 45, in visit
res = self.visit_call(expr)

File "/harddisk1/xxxx/Projects/TVM_Projects/tvm/vta/python/vta/top/graphpack.py", line 138, in visit_call
args = [self.visit(arg) for arg in call.args]

File "/harddisk1/xxxx/Projects/TVM_Projects/tvm/vta/python/vta/top/graphpack.py", line 138, in <listcomp>
args = [self.visit(arg) for arg in call.args]

File "/harddisk1/xxxx/.local/lib/python3.6/site-packages/tvm-0.6.0-py3.6-linux-x86_64.egg/tvm/relay/expr_functor.py", line 45, in visit
res = self.visit_call(expr)

File "/harddisk1/xxxx/Projects/TVM_Projects/tvm/vta/python/vta/top/graphpack.py", line 138, in visit_call
args = [self.visit(arg) for arg in call.args]

File "/harddisk1/xxxx/Projects/TVM_Projects/tvm/vta/python/vta/top/graphpack.py", line 138, in <listcomp>
args = [self.visit(arg) for arg in call.args]

File "/harddisk1/xxxx/.local/lib/python3.6/site-packages/tvm-0.6.0-py3.6-linux-x86_64.egg/tvm/relay/expr_functor.py", line 45, in visit
res = self.visit_call(expr)

File "/harddisk1/xxxx/Projects/TVM_Projects/tvm/vta/python/vta/top/graphpack.py", line 138, in visit_call
args = [self.visit(arg) for arg in call.args]

.
.
.

File "/harddisk1/xxxx/Projects/TVM_Projects/tvm/vta/python/vta/top/graphpack.py", line 138, in visit_call
args = [self.visit(arg) for arg in call.args]

File "/harddisk1/xxxx/Projects/TVM_Projects/tvm/vta/python/vta/top/graphpack.py", line 138, in <listcomp>
args = [self.visit(arg) for arg in call.args]

File "/harddisk1/xxxx/.local/lib/python3.6/site-packages/tvm-0.6.0-py3.6-linux-x86_64.egg/tvm/relay/expr_functor.py", line 45, in visit
res = self.visit_call(expr)

File "/harddisk1/xxxx/Projects/TVM_Projects/tvm/vta/python/vta/top/graphpack.py", line 164, in visit_call
kernel = _pack_weight(weight, kernel_shape, self.cfactor)

File "/harddisk1/xxxx/Projects/TVM_Projects/tvm/vta/python/vta/top/graphpack.py", line 62, in _pack_weight
assert int(dshape[1]) % cfactor == 0

AssertionError
1 Like

Hi @wltz did you ever resolve this “assert int(dshape[1]) % cfactor == 0” error? I’m encountering the same issue in my code as well.

I’m wondering if you have solved this problem. I also have this problem.