Quantcast
Channel: Processors forum - Recent Threads
Viewing all articles
Browse latest Browse all 17527

TMDSIDK574: TIDL - Support for convolution larger than 7x7

$
0
0

Part Number:TMDSIDK574

Hi,

I'm trying to convert a caffe-jacinto model to a quantized model using the TIDL framework. 

Our model contains a big initial convolution that appears not to be convertable using tidl_model_import.out

I understand that in the constraints highlighted in the documentation (http://software-dl.ti.com/processor-sdk-linux/esd/docs/latest/linux/Foundational_Components_TIDL.html) you "Verified for kernel size up to 7x7 (Shall work for higher values also, but not validated)"

Just for testing I tried to convert a simplified cifar10_jacintonet11v2 (input is 3x32x32) with a single ConvBN, a global L.Pooling and a InnerProduct. If I build, train and quantize a model with an initial kernel size of 7x7 or 9x9 the quantization is successful, whereas if I use a kernel of 11x11 I get the following error:

gabriele@roshi:~/ti-processor-sdk-linux-rt-am57xx-evm-05.02.00.10/linux-devkit/sysroots/x86_64-arago-linux/usr/share/ti/tidl/utils$ tidl_model_import.out test/testvecs/config/import/tidl_import_j11_cifar_totemic2.txt
Caffe Network File : ./test/testvecs/config/caffe-jacinto-models/scripts/training/cifar10_jacintonet11v2_2019-03-28_01-41-14/sparse/deploy.prototxt
Caffe Model File : ./test/testvecs/config/caffe-jacinto-models/scripts/training/cifar10_jacintonet11v2_2019-03-28_01-41-14/sparse/cifar10_jacintonet11v2_iter_16000.caffemodel
TIDL Network File : ./test/testvecs/config/tidl_models/tidl_net_cifar_jacintonet11v2_totemic2.bin
TIDL Model File : ./test/testvecs/config/tidl_models/tidl_param_cifar_jacintonet11v2_totemic2.bin
Name of the Network : jacintonet11v2_deploy
Num Inputs : 1
Num of Layer Detected : 6
0, TIDL_DataLayer , data 0, -1 , 1 , x , x , x , x , x , x , x , x , 0 , 0 , 0 , 0 , 0 , 1 , 3 , 32 , 32 , 0 ,
1, TIDL_BatchNormLayer , data/bias 1, 1 , 1 , 0 , x , x , x , x , x , x , x , 1 , 1 , 3 , 32 , 32 , 1 , 3 , 32 , 32 , 3072 ,
2, TIDL_ConvolutionLayer , conv1a 1, 1 , 1 , 1 , x , x , x , x , x , x , x , 2 , 1 , 3 , 32 , 32 , 1 , 16 , 24 , 24 , 3345408 ,
3, TIDL_PoolingLayer , pool5 1, 1 , 1 , 2 , x , x , x , x , x , x , x , 3 , 1 , 16 , 24 , 24 , 1 , 1 , 1 , 16 , 9216 ,
4, TIDL_InnerProductLayer , fc10 1, 1 , 1 , 3 , x , x , x , x , x , x , x , 4 , 1 , 1 , 1 , 16 , 1 , 1 , 1 , 10 , 160 ,
5, TIDL_SoftMaxLayer , prob 1, 1 , 1 , 4 , x , x , x , x , x , x , x , 5 , 1 , 1 , 1 , 10 , 1 , 1 , 1 , 10 , 10 ,
Total Giga Macs : 0.0034

Processing config file ./tempDir/qunat_stats_config.txt !
0, TIDL_DataLayer , 0, -1 , 1 , x , x , x , x , x , x , x , x , 0 , 0 , 0 , 0 , 0 , 1 , 3 , 32 , 32 ,
1, TIDL_BatchNormLayer , 1, 1 , 1 , 0 , x , x , x , x , x , x , x , 1 , 1 , 3 , 32 , 32 , 1 , 3 , 32 , 32 ,
2, TIDL_ConvolutionLayer , 1, 1 , 1 , 1 , x , x , x , x , x , x , x , 2 , 1 , 3 , 32 , 32 , 1 , 16 , 24 , 24 ,
3, TIDL_PoolingLayer , 1, 1 , 1 , 2 , x , x , x , x , x , x , x , 3 , 1 , 16 , 24 , 24 , 1 , 1 , 1 , 16 ,
4, TIDL_InnerProductLayer , 1, 1 , 1 , 3 , x , x , x , x , x , x , x , 4 , 1 , 1 , 1 , 16 , 1 , 1 , 1 , 10 ,
5, TIDL_SoftMaxLayer , 1, 1 , 1 , 4 , x , x , x , x , x , x , x , 5 , 1 , 1 , 1 , 10 , 1 , 1 , 1 , 10 ,
6, TIDL_DataLayer , 0, 1 , -1 , 5 , x , x , x , x , x , x , x , 0 , 1 , 1 , 1 , 10 , 0 , 0 , 0 , 0 ,

TIDL returned with error code : -1006, refer to interface header file for error code details

Error at line: 1609 : in file src/tidl_tb.c, of function : test_ti_dl_ivison
End of config list found !

I checked the header file I understand that -1006 is an error related to the width of a kernel in a convolution.

Is there any way to actually use larger convolutions with TIDL? Is the source code of the quantization tool available (specifically src/tidl_tb.c, of function : test_ti_dl_ivison)

Is the current constraint a physical limitation (e.g. the chip doesn't support this kind of operation) or a software limitation (e.g. the code has not been implemented yet)?

Thanks,

Gabriele


Viewing all articles
Browse latest Browse all 17527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>