导航

    全志在线开发者论坛

    • 注册
    • 登录
    • 搜索
    • 版块
    • 话题
    • 在线文档
    • 社区主页

    V851se[求助] NPU使用问题

    V Series
    3
    9
    419
    正在加载更多帖子
    • 从旧到新
    • 从新到旧
    • 最多赞同
    回复
    • 在新帖中回复
    登录后回复
    此主题已被删除。只有拥有主题管理权限的用户可以查看。
    • J
      jaying LV 5 最后由 编辑

      Q1:network_binary.nb文件太大:37.0 MB (38,898,688 )
      参考生成方式:
      https://v853.docs.aw-ol.com/npu/npu_yolov3/
      xx\ovxilb\yolov3_nbg_unify\network_binary.nb 在851se上溢出了

      1 条回复 最后回复 回复 引用 分享 0
      • A
        awwwwa LV 8 最后由 编辑

        需要裁剪优化yolo3模型,或者使用其他模型

        J 1 条回复 最后回复 回复 引用 分享 0
        • J
          jaying LV 5 @awwwwa 最后由 编辑

          @awwwwa 大佬 请问裁剪优化有什么参考文档或者网址么?我现在换了yolov3-tiny版本实现,xx.nb文件5M左右,但是det_demo使用libawnn.a识别不出坐标值,不确定是为什么(没做过NPU开发,ai相关接触也不多)

          1 条回复 最后回复 回复 引用 分享 0
          • LIUJUNJIANG
            煎Bingo子 LV 3 最后由 编辑

            请问有NPU扩展软件包的网盘链接分析吗?非常感谢

            J 1 条回复 最后回复 回复 引用 分享 0
            • J
              jaying LV 5 @LIUJUNJIANG 最后由 编辑

              @liujunjiang 没有压缩包资源 我是买板子和店家要的SDK里面带了NPU相关的src

              LIUJUNJIANG 1 条回复 最后回复 回复 引用 分享 0
              • LIUJUNJIANG
                煎Bingo子 LV 3 @jaying 最后由 编辑

                @jaying 店家给的网盘资料方便分享一下吗?非常感谢!

                J 1 条回复 最后回复 回复 引用 分享 0
                • J
                  jaying LV 5 @LIUJUNJIANG 最后由 编辑

                  @liujunjiang /openwrt/package/npu
                  通过网盘分享的文件:npu.7z
                  链接: https://pan.baidu.com/s/1iDByEzFMrZAXMVbUWSwKSQ?pwd=khxi 提取码: khxi

                  LIUJUNJIANG 1 条回复 最后回复 回复 引用 分享 0
                  • LIUJUNJIANG
                    煎Bingo子 LV 3 @jaying 最后由 编辑

                    @jaying 非常感谢!

                    1 条回复 最后回复 回复 引用 分享 0
                    • J
                      jaying LV 5 最后由 编辑

                      fe77fe5f-c840-4a36-95b9-330fb64a37e0-image.png
                      这一步失败了,不明白为什么....
                      命令:

                      pegasus quantize --model yolov3.json --model-data yolov3.data --batch-size 2 --device CPU --with-input-meta yolov3_inputmeta.yml --rebuild --model-quantize yolov3.quantize --quantizer asymmetric_affine --qtype uint8
                      

                      结果:

                      ..............
                      D Process convolution_64_147 ...
                      D Acuity output shape(convolution): (2 76 76 18)
                      D Tensor @convolution_64_147:out0 type: float32
                      D Process output_65_148_acuity_mark_perm_152 ...
                      D Acuity output shape(permute): (2 18 76 76)
                      D Tensor @output_65_148_acuity_mark_perm_152:out0 type: float32
                      D Process output_65_148 ...
                      D Acuity output shape(output): (2 18 76 76)
                      D Tensor @output_65_148:out0 type: float32
                      I Build prune_16 complete.
                      D *********** Setup database (1) ***********
                      D Setup dataset "TEXT":
                      D Lids: ['input_0']
                      D Layouts: ['nchw']
                      D Shapes: [[2, 3, 608, 608]]
                      D Data types: ['float32']
                      D Sparse tensors: []
                      D Tensor names(H5FS only): []
                      W:tensorflow:AutoGraph could not transform <acuitylib.core.execution.BackendFunction object at 0x7f8c8c056d90> and will run it as-is.
                      Please report this to the TensorFlow team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output.
                      Cause: Unable to locate the source code of <function BackendFunction.__call__ at 0x7f8c8cec69d0>. Note that functions defined in certain environments, like the interactive Python shell do not expose their source code. If that is the case, you should to define them in a .py source file. If you are certain the code is graph-compatible, wrap the call using @tf.autograph.do_not_convert. Original error: could not get source code
                      To silence this warning, decorate the function with @tf.autograph.experimental.do_not_convert
                      I Running 1 iterations
                      D 0(100.00%)
                      D Calibrating ...
                      Traceback (most recent call last):
                        File "pegasus.py", line 131, in <module>
                        File "pegasus.py", line 108, in main
                        File "acuitylib/app/medusa/commands.py", line 212, in execute
                        File "acuitylib/vsi_nn.py", line 589, in quantize
                        File "acuitylib/app/medusa/quantization.py", line 151, in run
                        File "acuitylib/app/medusa/quantization.py", line 58, in _run_quantization
                        File "acuitylib/quantization/quantize_manager.py", line 516, in calculate_params
                        File "acuitylib/quantization/quantize_manager.py", line 272, in _cal_quantize_param_all
                        File "acuitylib/quantization/types.py", line 200, in calibrate
                        File "acuitylib/quantization/quantizers/asymmetric_quantizer.py", line 102, in convert_from_minmax
                        File "acuitylib/quantization/quantizers/asymmetric_quantizer.py", line 161, in compute_from_minmax
                        File "acuitylib/quantization/utils.py", line 230, in iscorrect_scalar_minmax_value
                      ValueError: NAN is detected in minmax (nan,nan)
                      [4296] Failed to execute script 'pegasus' due to unhandled exception!
                      
                      1 条回复 最后回复 回复 引用 分享 0
                      • 1 / 1
                      • First post
                        Last post

                      Copyright © 2024 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号

                      行为准则 | 用户协议 | 隐私权政策