导航

    全志在线开发者论坛

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

    各位大佬, 有人知道全志NPU支持音频模型吗

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

      我按照NPUYOLO V3模型转换的步骤, 去转换yamnet(google开源音频分类模型)模型, 生成的inputmeta.yml如下

      # !!!This file disallow TABs!!!
      # "category" allowed values: "image, frequency, undefined"
      # "database" allowed types: "TEXT, NPY, H5FS, SQLITE, LMDB, GENERATOR, ZIP"
      # "tensor_name" only support in H5FS database
      # "preproc_type" allowed types:"IMAGE_RGB, IMAGE_RGB888_PLANAR, IMAGE_RGB888_PLANAR_SEP, IMAGE_I420, 
      # IMAGE_NV12, IMAGE_YUV444, IMAGE_GRAY, IMAGE_BGRA, TENSOR"
      input_meta:
        databases:
        - path: dataset.txt
          type: TEXT
          ports:
          - lid: waveform_94
            category: image
            dtype: float32
            sparse: false
            tensor_name:
            layout: nchw
            shape:
            - 1
            fitting: scale
            preprocess:
              reverse_channel: true
              scale: 0.0039
              preproc_node_params:
                add_preproc_node: false
                preproc_type: TENSOR
                preproc_perm:
                - 0
            redirect_to_output: false
      

      显示的category是image, 但是我没有管他继续运行, 最后得到的结果是

      D *********** Setup database (1) ***********
      D Setup dataset "TEXT":
      D Lids: ['waveform_94']
      D Layouts: ['nchw']
      D Shapes: [[1]]
      D Data types: ['float32']
      D Sparse tensors: []
      D Tensor names(H5FS only): []
      W:tensorflow:AutoGraph could not transform <acuitylib.core.execution.BackendFunction object at 0x7f6b5f5f42b0> 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 0x7f6b605b49d0>. 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
      W The dimension of input0 != input1, please make sure that the version of tensorflow is greater than 1.14
      I Running 1 iterations
      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 592, in quantize
        File "acuitylib/app/medusa/quantization.py", line 151, in run
        File "acuitylib/app/medusa/quantization.py", line 54, in _run_quantization
        File "acuitylib/app/medusa/workspace.py", line 121, in run
        File "acuitylib/app/medusa/workspace.py", line 127, in _run
        File "acuitylib/app/medusa/workspace.py", line 107, in _run_iteration
        File "acuitylib/core/execution.py", line 567, in __call__
        File "acuitylib/core/execution.py", line 506, in _dataset_feed_data
        File "acuitylib/dataset/text_dataset.py", line 45, in batch
        File "acuitylib/dataset/file_path_dataset.py", line 64, in _to_tensor
        File "acuitylib/dataset/file_path_dataset.py", line 26, in gen_read_file_graph
        File "tensorflow/python/util/dispatch.py", line 201, in wrapper
        File "tensorflow/python/ops/image_ops_impl.py", line 2706, in decode_image
        File "tensorflow/python/util/dispatch.py", line 201, in wrapper
        File "tensorflow/python/util/deprecation.py", line 507, in new_func
        File "tensorflow/python/ops/control_flow_ops.py", line 1210, in cond
        File "tensorflow/python/ops/image_ops_impl.py", line 2689, in check_png
        File "tensorflow/python/util/dispatch.py", line 201, in wrapper
        File "tensorflow/python/util/deprecation.py", line 507, in new_func
        File "tensorflow/python/ops/control_flow_ops.py", line 1210, in cond
        File "tensorflow/python/ops/image_ops_impl.py", line 2676, in check_gif
        File "tensorflow/python/util/dispatch.py", line 201, in wrapper
        File "tensorflow/python/util/deprecation.py", line 507, in new_func
        File "tensorflow/python/ops/control_flow_ops.py", line 1210, in cond
        File "tensorflow/python/ops/image_ops_impl.py", line 2647, in _bmp
        File "tensorflow/python/util/dispatch.py", line 201, in wrapper
        File "tensorflow/python/util/tf_should_use.py", line 247, in wrapped
        File "tensorflow/python/ops/control_flow_ops.py", line 154, in Assert
      tensorflow.python.framework.errors_impl.InvalidArgumentError: Expected 'tf.Tensor(False, shape=(), dtype=bool)' to be true. Summarized data: b'Unable to decode bytes as JPEG, PNG, GIF, or BMP'
      [4142] Failed to execute script 'pegasus' due to unhandled exception!
      

      就算把category的image改成audio, 结果也是一样

      1 条回复 最后回复 回复 引用 分享 0
      • 1 / 1
      • First post
        Last post

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

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