Does image_shape have some restrictions?


#1
My device is RK3399,When I let image_shape = (3, 224, 224),mage_shape = (3, 224, 112),it run ok, When image_shape = (3, 224, 222), image_shape = (3, 224, 64), it run with these errors:

Traceback (most recent call last):
File “deploy_model_on_mali_server.py”, line 192, in
shape={“data”: data_shape}, params=params, target_host=target_host)
File “/home/daming/.local/lib/python2.7/site-packages/nnvm-0.8.0-py2.7.egg/nnvm/compiler/build_module.py”, line 261, in build
graph = graph.apply(“GraphFusePartition”).apply(“GraphFuseCompile”)
File “/home/daming/.local/lib/python2.7/site-packages/nnvm-0.8.0-py2.7.egg/nnvm/graph.py”, line 234, in apply
check_call(_LIB.NNGraphApplyPasses(self.handle, npass, cpass, ctypes.byref(ghandle)))
File “/home/daming/.local/lib/python2.7/site-packages/nnvm-0.8.0-py2.7.egg/nnvm/_base.py”, line 75, in check_call
raise NNVMError(py_str(_LIB.NNGetLastError()))
nnvm._base.NNVMError: TVMCall CFunc Error:


#2

Every model has requirement of input’s shape.


#3

Sorry, my question is not related to input.I have a caffe model which convert to mxnet(model.jason and model.params).When I run nnvm.compiler.build it have these problems:

Traceback (most recent call last):
File “deploy_model_on_mali_server.py”, line 209, in
shape={“data”: data_shape}, params=nnvm_params, target_host=target_host)
File “/home/daming/.local/lib/python2.7/site-packages/nnvm-0.8.0-py2.7.egg/nnvm/compiler/build_module.py”, line 261, in build
graph = graph.apply(“GraphFusePartition”).apply(“GraphFuseCompile”)
File “/home/daming/.local/lib/python2.7/site-packages/nnvm-0.8.0-py2.7.egg/nnvm/graph.py”, line 234, in apply
check_call(_LIB.NNGraphApplyPasses(self.handle, npass, cpass, ctypes.byref(ghandle)))
File “/home/daming/.local/lib/python2.7/site-packages/nnvm-0.8.0-py2.7.egg/nnvm/_base.py”, line 75, in check_call
raise NNVMError(py_str(_LIB.NNGetLastError()))
nnvm._base.NNVMError: TVMCall CFunc Error:
Traceback (most recent call last):
File “/home/daming/.local/lib/python2.7/site-packages/tvm-0.2.0-py2.7-linux-x86_64.egg/tvm/_ffi/_ctypes/function.py”, line 54, in cfun
rv = local_pyfunc(*pyargs)
File “/home/daming/.local/lib/python2.7/site-packages/nnvm-0.8.0-py2.7.egg/nnvm/top/nn.py”, line 82, in compute_conv2d
out = topi.nn.conv2d(inputs[0], inputs[1], strides, padding, layout)
File “”, line 2, in conv2d
File “/home/daming/.local/lib/python2.7/site-packages/tvm-0.2.0-py2.7-linux-x86_64.egg/tvm/target.py”, line 345, in dispatch_func
return dispatch_dict[k](*args, **kwargs)
File “/home/daming/.local/lib/python2.7/site-packages/topi-0.2.0-py2.7.egg/topi/mali/conv2d.py”, line 128, in decl_conv2d
return _decl_spatialpack(data, kernel, stride, padding, layout, out_dtype)
File “/home/daming/.local/lib/python2.7/site-packages/topi-0.2.0-py2.7.egg/topi/mali/conv2d.py”, line 213, in _decl_spatialpack
assert CO % VC == 0
AssertionError


#4

Operators like convolution has a check of input shape against other parameters like filters, kernel, strides …etc.

We shouldn’t change only input shape just like that.

Siva


#5

This assertion is mali backend only.

Related discussion here https://github.com/merrymercy/tvm-mali/issues/1

Current convolution schedule on mali cannot guarantee the performance for uncommon input shapes.