日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

SNPE教程2-量化

發(fā)布時(shí)間:2024/1/18 编程问答 55 豆豆
生活随笔 收集整理的這篇文章主要介紹了 SNPE教程2-量化 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

寫在前面

官方手冊(cè)上和量化相關(guān)的內(nèi)容:

  • quantizing a model: https://developer.qualcomm.com/sites/default/files/docs/snpe/model_conversion.html
  • 工具snpe-dlc-quantize:https://developer.qualcomm.com/sites/default/files/docs/snpe/tools.html#tools_snpe-dlc-quantize
  • 何時(shí)使用量化:
    https://developer.qualcomm.com/sites/default/files/docs/snpe/quantized_models.html
  • 量化過程

  • 工具位置
    在$SNPE_ROOT/bin/x86_64-linux-clang下
  • 命令行下輸入命令進(jìn)行轉(zhuǎn)換./snpe-dlc-quantize --input_dlc inception_v3.dlc --input_list /home/node2/snpe/inception_demo/data/cropped/raw_list.txt snpe-dlc-quantize命令參數(shù)簡(jiǎn)要解析:[-h,——help]顯示幫助信息。 [——version]顯示版本信息。 [——input_dlc]包含定點(diǎn)編碼模型的dlc容器的路徑應(yīng)該生成元數(shù)據(jù)。這個(gè)參數(shù)是必需的。 [——input_list]指定試驗(yàn)輸入的文件的路徑。這個(gè)文件應(yīng)該是純文本文件,每行包含一個(gè)或多個(gè)絕對(duì)文件路徑。這些檔案將被用作試驗(yàn)設(shè)置。每個(gè)路徑都指向一個(gè)包含一個(gè)試驗(yàn)輸入的二進(jìn)制文件“原始”格式,無需任何進(jìn)一步修改即可被SNPE使用。這與向snpe-net運(yùn)行的應(yīng)用程序提供輸入的方式類似。 [——output_dlc = < val >]應(yīng)該寫入包含元數(shù)據(jù)的量化模型容器的路徑。如果省略此參數(shù),量化模型將寫入_quantized.dlc。
  • 出現(xiàn)報(bào)錯(cuò)./snpe-dlc-quantize: error while loading shared libraries: libomp.so: cannot open shared object file: No such file or directory 查找libomp.so的位置:ind / -name libomp.so 2>/dev/null
    將得到的位置加入環(huán)境變量:
    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/node2/snpe/snpe-1.40.0.2130/lib/x86_64-linux-clang
  • 重復(fù)2中的命令,量化轉(zhuǎn)換成功[INFO] InitializeStderr: DebugLog initialized. [INFO] Writing intermediate model [WARNING] NetworkTopology::populateNetworkDesc network desc inputs is empty. Does this network have data/input layer? [INFO] Setting activation for layer: input:0 and buffer: input:0 [INFO] bw: 8, min: -1.000000, max: 0.992188, delta: 0.007812, offset: -128.000000 [INFO] Setting activation for layer: InceptionV3/InceptionV3/Conv2d_1a_3x3/convolution and buffer: InceptionV3/InceptionV3/Conv2d_1a_3x3/BatchNorm/batchnorm/add_1:0 [INFO] bw: 8, min: -10.426631, max: 10.674884, delta: 0.082751, offset: -126.000000 [INFO] Setting activation for layer: InceptionV3/InceptionV3/Conv2d_1a_3x3/Relu and buffer: InceptionV3/InceptionV3/Conv2d_1a_3x3/Relu:0 [INFO] bw: 8, min: 0.000000, max: 10.647199, delta: 0.041754, offset: 0.000000 [INFO] Setting activation for layer: InceptionV3/InceptionV3/Conv2d_2a_3x3/convolution and buffer: InceptionV3/InceptionV3/Conv2d_2a_3x3/BatchNorm/batchnorm/add_1:0 [INFO] bw: 8, min: -8.310483, max: 8.508352, delta: 0.065956, offset: -126.000000 [INFO] Setting activation for layer: InceptionV3/InceptionV3/Conv2d_2a_3x3/Relu and buffer: InceptionV3/InceptionV3/Conv2d_2a_3x3/Relu:0 [INFO] bw: 8, min: 0.000000, max: 8.484724, delta: 0.033273, offset: 0.000000 [INFO] Setting activation for layer: InceptionV3/InceptionV3/Conv2d_2b_3x3/convolution and buffer: InceptionV3/InceptionV3/Conv2d_2b_3x3/BatchNorm/batchnorm/add_1:0 [INFO] bw: 8, min: -9.289681, max: 10.616778, delta: 0.078065, offset: -119.000000 [INFO] Setting activation for layer: InceptionV3/InceptionV3/Conv2d_2b_3x3/Relu and buffer: InceptionV3/InceptionV3/Conv2d_2b_3x3/Relu:0 [INFO] bw: 8, min: 0.000000, max: 10.628510, delta: 0.041680, offset: 0.000000 [INFO] Setting activation for layer: InceptionV3/InceptionV3/MaxPool_3a_3x3/MaxPool and buffer: InceptionV3/InceptionV3/MaxPool_3a_3x3/MaxPool:0 [INFO] bw: 8, min: 0.000000, max: 10.628510, delta: 0.041680, offset: 0.000000 [INFO] Setting activation for layer: InceptionV3/InceptionV3/Conv2d_3b_1x1/convolution and buffer: InceptionV3/InceptionV3/Conv2d_3b_1x1/BatchNorm/batchnorm/add_1:0 [INFO] bw: 8, min: -6.303848, max: 11.557054, delta: 0.070043, offset: -90.000000
  • 總結(jié)

    以上是生活随笔為你收集整理的SNPE教程2-量化的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。

    如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。