您好!
我尝试测试 TIDL 主机仿真模式、但发生了一些问题。 我的步骤如下:
1 主机仿真中的构建源(根据用户指南3.4.2)
我在 ti_dl\test\out\路径中成功获得了两个***.out.exe 文件。
(实际上、当我开始编译时会出现一些错误、例如一些头文件丢失(例如 vcop_nnncs_bias 内核.h)、但我修复了这些错误、并获得了两个 exe 文件、没有错误)
2导入模式
我从 github.com/tidsp/caffe-jacinto-models 克隆了 Caffe-Jacinto-models。
然后、使用导入工具对其进行了翻译:
->...\ti_dl\utils\tidlModelImport > tidl_model_import.out.exe ..\test\testvecs\config\import\tidl_import_jseg21.txt
日志的一部分如下所示:
(笑声)
数字输入:1.
检测到的层数:27.
0、TIDL_DataLayer、数据0、-1、1、 x、x、x、x、x、 x、x、x、0、0、 0、0、0、1、3、 512、1024、0、
1、TIDL_BatchNormalLayer、data/bias 1、1、1、 0、x、x、x、x、 x、x、x、1、1、 3、512、1024、1、3、 512、1024、1572864、
2、TIDL_ConvolutionLayer、conv1a 1、1、1、 1、x、x、x、x、 x、x、x、2、1、 3、512、1024、1、32、 256、512、314572800、
3、TIDL_ConvolutionLayer、conv1b 1、1、1、 2、x、x、x、x、 x、x、x、3、1、 32、256、512、1、32、 128、256、301989888、
4、TIDL_ConvolutionLayer、res2a_branch2a 1、1、1、 3、x、x、x、x、 x、x、x、4、1、 32、128、256、1、64、 128、256、603979776、
5、TIDL_ConvolutionLayer、res2a_branch2b 1、1、1、 4、x、x、x、x、 x、x、x、5、1、 64、128、256、1、64、 64、128、301989888、
6、TIDL_ConvolutionLayer、res3a_branch2a 1、1、1、 5、x、x、x、x、 x、x、x、6、1、 64、64、128、1、128、 64、128、603979776、
7、TIDL_ConvolutionLayer、res3a_branch2b 1、1、1、 6、x、x、x、x、 x、x、x、7、1、 128、64、128、1、128、 64、128、301989888、
8、TIDL_PoolingLayer、pool3 1、1、1、 7、x、x、x、x、 x、x、x、8、1、 128、64、128、1、128、 32、64、1048576、
9、TIDL_ConvolutionLayer、res4a_branch2a 1、1、1、 8、x、x、x、x、 x、x、x、9、1、 128、32、64、1、256、 32、64、603979776、
10、TIDL_ConvolutionLayer、res4a_branch2b 1、1、1、 9、x、x、x、x、 x、x、x、10、1、 256、32、64、1、256、 32、64、301989888、
11、TIDL_PoolingLayer、pool4 1、1、1、 10、x、x、x、x、 x、x、x、11、1、 256、32、64、1、256、 32、64、524288、
12、TIDL_ConvolutionLayer、res5a_branch2a 1、1、1、 11、x、x、x、x、 x、x、x、12、1、 256、32、64、1、512、 32、64、2415919104、
13、TIDL_ConvolutionLayer、res5a_branch2b 1、1、1、 12、x、x、x、x、 x、x、x、13、1、 512、32、64、1、512、 32、64、1207959552、
14、TIDL_ConvolutionLayer、out5a 1、1、1、 13、x、x、x、x、 x、x、x、14、1、 512、32、64、1、64、 32、64、301989888、
15、TIDL_Deconv2DLayer、out5a_up2 1、1、1、 14、x、x、x、x、 x、x、x、15、1、 64、32、64、1、64、 64、128、2097152、
16、TIDL_ConvolutionLayer、out3a 1、1、1、 7、x、x、x、x、 x、x、x、16、1、 128、64、128、1、64、 64、128、301989888、
17、TIDL_EltWiseLayer、out3_Out5_combined 1、2、1、 15、16、x、x、x、 x、x、x、17、1、 64、64、128、1、64、 64、128、524288、
18、TIDL_ConvolutionLayer、ctx_CONV1 1、1、1、 17、x、x、x、x、 x、x、x、18、1、 64、64、128、1、64、 64、128、301989888、
19、TIDL_ConvolutionLayer、ctx_conv2 1、1、1、 18、x、x、x、x、 x、x、x、19、1、 64、64、128、1、64、 64、128、301989888、
20、TIDL_ConvolutionLayer、ctx_conv3 1、1、1、 19、x、x、x、x、 x、x、x、20、1、 64、64、128、1、64、 64、128、301989888、
21、TIDL_ConvolutionLayer、ctx_conv4 1、1、1、 20、x、x、x、x、 x、x、x、21、1、 64、64、128、1、64、 64、128、301989888、
22、TIDL_ConvolutionLayer、ctx_final 1、1、1、 21、x、x、x、x、 x、x、x、22、1、 64、64、128、1、8、 64、128、37748736、
23、TIDL_Deconv2DLayer、out_div_final_up2 1、1、1、 22、x、x、x、x、 x、x、x、23、1、 8、64、128、1、8、 128、256、1048576、
24、TIDL_Deconv2DLayer、out_decv_final_up4 1、1、1、 23、x、x、x、x、 x、x、x、24、1、 8、128、256、1、8、 256、512、4194304、
25、TIDL_Deconv2DLayer、out_div_final_up8 1、1、1、 24、x、x、x、x、 x、x、x、25、1、 8、256、512、1、8、 512、1024、16777216、
26、TIDL_ArgMaxLayer、argMaxOut 1、1、1、 25、x、x、x、x、 x、x、x、26、1、 8、512、1024、1、1、 512、1024、8388608、
…
从这些日志中、我们可以知道模型有27层、每个层的类型。
我成功获取了 net 和 param bin 文件。
3正在运行
我更改了默认的推测配置文件"infer\tidl_config_jseg21_tiscapes.txt"、将其与步骤2中生成的 bin 文件相关联
然后、我运行 exe 程序:
->...ti_dl\test\out>dsp_test_dl_algo.out.exe
失败的日志:
正在处理配置文件..\testvecs\config\infer\tidl_config_jseg21_tiscapes.txt!
0、TIDL_DataLayer、0、0、0、 x、x、x、x、x、 x、x、x、0、0、 0、0、0、0、0、 0、0、
1、TIDL_ReLULayer、1、512、1024、0、 0、0、0、0、0、 0、0、0、0、0、 0、0、0、0、1、 0、0、0、0、0、 0、0、0、0、0、 0、0、0、0、0、 1、32、0、0、0、 1、0、0、0、0、 0、0、0、0、0、 0、0、0、0、0、 0、1、0、0、0、 0、0、0、0、0、 0、0、0、0、0、 0、0、0、1、2、 0、0、0、0、0、 0、0、0、0、0、 0、0、0、0、0、 0、0、26380、0、0、0、 0、0、0、0、0、 0、0、0、0、0、 0、0、0、1、1、 0、0、0、0、0、 0、0、0、0、0、 0、0、0、0、0、 0、0、0、0、0、 0、0、0、0、0、 0、0、0、0、0、 0、0、0、1、4、 0、0、1、64、0、 0、0、0、0、0、 0、0、0、0、0、 0、0、0、0、64、 0、0、0、0、0、 0、0、0、0、0、 0、0、0、0、0、 0、41430、0、0、0、0、 0、0、0、0、0、 0、0、0、0、0、 0、0、0、0、0、 0、0、0、0、0、 0、0、0、0、0、 0、0、0、0、0、 0、1、0、0、4、 0、0、0、0、0、 0、0、0、0、0、 0、0、0、0、0、 4、0、0、0、0、 0、0、0、0、0、 0、0、0、0、0、 0、0、0、0、0、 1、64、0、0、0、 0、0、0、0、0、 0、0、0、0、0、 0、0、32、0、0、 0、0、0、0、0、 0、0、0、0、0、 0、0、0、0、115、0、 0、0、0、0、0、 0、0、0、0、0、 0、0、0、0、0、 0、0、0、0、0、 0、0、0、0、0、 0、0、0、0、0、 0、0、0、0、1、 0、0、0、0、0、 0、0、0、0、0、 0、0、0、0、0、 0、0、0、0、0、 0、0、0、0、0、 0、0、0、0、0、 0、0、0、0、0、 3、1、0、1、64、 0、0、0、0、0、 0、0、0、0、0、 0、0、0、0、0、 64、0、0、0、0、 0、0、0、0、0、 0、0、0、0、0、 0、512、0、0、0、0、0、 0、0、0、0、0、 0、0、0、0、0、 0、0、0、0、0、 0、0、0、0、0、 0、0、0、0、0、 0、0、0、0、0、 0、0、4、0、0、 0、0、0、0、0、 0、0、0、0、0、 0、0、0、0、0、 0、0、0、0、0、 0、0、0、0、0、 0、0、0、0、0、 0、0、0、2、0、 0、13、0、0、0、 0、0、0、0、0、 0、0、0、0、0、 0、0、14、0、0、 0、0、0、0、0、 0、0、0、0、0、 0、0、0、1、64、 0、0、0、1、0、 0、0、0、0、0、 0、0、0、0、0、 0、
2、TIDL_DataLayer、1、0、0、 x、x、x、x、x、 x、x、x、0、0、 0、0、0、0、0、 0、0、
3、TIDL_DataLayer、0、0、0、 x、x、x、x、x、 x、x、x、0、0、 0、0、0、0、0、 0、0、
4、TIDL_DataLayer、0、0、0、 x、x、x、x、x、 x、x、x、0、0、 0、0、0、0、0、 0、0、
5、TIDL_DataLayer、0、0、0、 x、x、x、x、x、 x、x、x、0、0、 0、0、0、0、0、 0、0、
6、TIDL_DataLayer、0、0、0、 x、x、x、x、x、 x、x、x、0、0、 0、0、0、0、0、 0、0、
7、TIDL_DataLayer、0、0、0、 x、x、x、x、x、 x、x、x、0、0、 0、0、0、0、0、 0、0、
8、TIDL_DataLayer、8、0、0、 x、x、x、x、x、 x、x、x、0、0、 0、0、0、0、0、 0、0、
9、TIDL_DataLayer、0、0、0、 x、x、x、x、x、 x、x、x、0、0、 0、0、0、0、0、 0、0、
10、TIDL_DataLayer、64、0、0、 x、x、x、x、x、 x、x、x、0、0、 0、0、0、0、0、 0、0、
11、TIDL_DataLayer、0、0、0、 x、x、x、x、x、 x、x、x、0、0、 0、0、0、0、0、 0、0、
12、TIDL_DataLayer、0、0、0、 x、x、x、x、x、 x、x、x、0、0、 0、0、0、0、0、 0、0、
13、TIDL_DataLayer、0、0、0、 x、x、x、x、x、 x、x、x、0、0、 0、0、0、0、0、 0、0、
14、TIDL_DataLayer、0、0、0、 x、x、x、x、x、 x、x、x、0、0、 0、0、0、0、0、 0、0、
15、TIDL_DataLayer、0、0、0、 x、x、x、x、x、 x、x、x、0、0、 0、0、0、0、0、 0、0、
16、TIDL_DataLayer、0、0、0、 x、x、x、x、x、 x、x、x、0、0、 0、0、0、0、0、 0、0、
17、TIDL_DataLayer、0、0、0、 x、x、x、x、x、 x、x、x、0、0、 0、0、0、0、0、 0、0、
18、TIDL_DataLayer、0、0、0、 x、x、x、x、x、 x、x、x、0、0、 0、0、0、0、0、 0、0、
19、TIDL_DataLayer、0、0、0、 x、x、x、x、x、 x、x、x、0、0、 0、0、0、0、0、 0、0、
20、TIDL_DataLayer、0、0、0、 x、x、x、x、x、 x、x、x、0、0、 0、0、0、0、0、 0、0、
21、TIDL_DataLayer、0、0、0、 x、x、x、x、x、 x、x、x、0、0、 0、0、0、0、0、 0、0、
22、TIDL_DataLayer、0、0、0、 x、x、x、x、x、 x、x、x、0、0、 0、0、0、0、0、 0、0、
23、TIDL_DataLayer、0、0、0、 x、x、x、x、x、 x、x、x、0、0、 0、0、0、0、0、 0、0、
24、TIDL_DataLayer、0、0、0、 x、x、x、x、x、 x、x、x、0、0、 0、0、0、0、0、 0、0、
25、TIDL_DataLayer、0、0、0、 x、x、x、x、x、 x、x、x、0、0、 0、0、0、0、0、 0、0、
26、TIDL_DataLayer、0、0、0、 x、x、x、x、x、 x、x、x、0、0、 0、0、0、0、0、 0、0、
函数:test_ti_dl_ivison 的行:1491:位于文件..\src\tidl_tb.c 中时出错
找到配置列表的末尾!
我检查 了 tidl_tb.c 的第1491行、发现错误是 由 algAlloc 函数引起的。
从 tidl_alg.c 中的函数 tidl_alloc()中,我发现没有用于"Tidl_DataLayer"和"Tidl_ReLULayer" 的 aloAlloc 函数。
因此程序无法向前推进。
我认为问题可能是由 netBinFile 读取引起的? 因为步骤2和3中的图层类型完全不同。
第1层应该是 TIDL_BatchNormalLayer、而不是 TIDL_ReLULayer、第2层应该是 TIDL_ConvolutionLayer、而不是 TIDL_DataLayer?
我尝试将每个图层类型设置为“正确”值作为步骤2的日志,但程序在 TIDL_conv2DAlloc()处没有响应。
我不知道如何解决此错误、请帮我解决、谢谢。
(SDK 版本为 processor_sdk_vision_03_01_00_00、TIDL 版本为 REL.TIDL.00.08.00.00)