导航

    全志在线开发者论坛

    • 注册
    • 登录
    • 搜索
    • 版块
    • 话题
    • 在线文档
    • 社区主页
    1. 主页
    2. running
    R
    • 资料
    • 关注 0
    • 粉丝 0
    • 我的积分 183
    • 主题 2
    • 帖子 2
    • 最佳 0
    • 群组 0

    runningLV 2

    @running

    183
    积分
    0
    声望
    1
    资料浏览
    2
    帖子
    0
    粉丝
    0
    关注
    注册时间 最后登录

    running 取消关注 关注

    running 发布的最新帖子

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

      我按照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, 结果也是一样

      发布在 V Series
      R
      running
    • V851 pegasua转换tflite模型失败

      running@ubuntu:/home/work/test/yamnet$ pegasus import tflite --model yamnet.tflite --output-model yamnet.json --output-data yamnet.data
      2025-08-12 20:31:47.702054: W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library 'libcudart.so.10.1'; dlerror: libcudart.so.10.1: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /home/work/VeriSilicon/acuity-toolkit-binary-6.6.1/bin/acuitylib
      2025-08-12 20:31:47.702093: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
      D Get binary package acuity_path [/home/work/VeriSilicon/acuity-toolkit-binary-6.6.1/bin]
      I Namespace(feed_const_inputs=None, import='tflite', input_size_list=None, inputs=None, model='yamnet.tflite', output_data='yamnet.data', output_model='yamnet.json', outputs=None, size_with_batch=None, which='import')
      I Start importing tflite...
      W Unsupport attribute fold_const_inputs
      I Model: yamnet
      I Version: 3
      I Description: MLIR Converted.
      I Subgraphs: 1
      D Get binary package acuity_path [/home/work/VeriSilicon/acuity-toolkit-binary-6.6.1/bin]
      D Convert layer shape
      D Convert layer strided_slice
      D Convert layer maximum
      D Convert layer sub
      D Convert layer cast
      D Convert layer div
      D Convert layer ceil
      D Convert layer cast
      D Convert layer mul
      D Convert layer sub
      D Convert layer sub
      D Convert layer maximum
      D Convert layer add
      D Convert layer pack
      D Convert layer pack
      D Convert layer pad
      W Tensor b'yamnet_frames/tf_op_layer_Pad_2/paddings/Pad_2/paddings;StatefulPartitionedCall/yamnet_frames/tf_op_layer_Pad_2/paddings/Pad_2/paddings' has no buffer, init to zeros.
      D Convert layer shape
      D Convert layer zeros_like
      D Convert layer split_v
      D Convert layer reshape
      W Tensor b'yamnet_frames/tf_op_layer_split_2/split_2;StatefulPartitionedCall/yamnet_frames/tf_op_layer_split_2/split_21' has no buffer, init to zeros.
      W Tensor b'yamnet_frames/tf_op_layer_Reshape_8/Reshape_8;StatefulPartitionedCall/yamnet_frames/tf_op_layer_Reshape_8/Reshape_8' has no buffer, init to zeros.
      D Convert layer floor_div
      D Convert layer mul
      D Convert layer pack
      D Convert layer pack
      D Convert layer sub
      D Convert layer floor_div
      D Convert layer add
      D Convert layer maximum
      D Convert layer range
      D Convert layer mul
      D Convert layer pack
      D Convert layer reshape
      W Tensor b'yamnet_frames/tf_op_layer_Mul_8/Mul_8;StatefulPartitionedCall/yamnet_frames/tf_op_layer_Mul_8/Mul_8' has no buffer, init to zeros.
      W Tensor b'yamnet_frames/tf_op_layer_Reshape_10/Reshape_10;StatefulPartitionedCall/yamnet_frames/tf_op_layer_Reshape_10/Reshape_10' has no buffer, init to zeros.
      D Convert layer add
      D Convert layer pack
      D Convert layer strided_slice
      W Tensor b'yamnet_frames/tf_op_layer_ZerosLike_2/ZerosLike_2;StatefulPartitionedCall/yamnet_frames/tf_op_layer_ZerosLike_2/ZerosLike_2' has no buffer, init to zeros.
      W Tensor b'yamnet_frames/tf_op_layer_concat_6/values_1/concat_6/values_1;StatefulPartitionedCall/yamnet_frames/tf_op_layer_concat_6/values_1/concat_6/values_1' has no buffer, init to zeros.
      D Convert layer reshape
      W Tensor b'yamnet_frames/tf_op_layer_StridedSlice_2/StridedSlice_2;StatefulPartitionedCall/yamnet_frames/tf_op_layer_StridedSlice_2/StridedSlice_2' has no buffer, init to zeros.
      W Tensor b'yamnet_frames/tf_op_layer_Reshape_9/Reshape_9;StatefulPartitionedCall/yamnet_frames/tf_op_layer_Reshape_9/Reshape_9' has no buffer, init to zeros.
      D Convert layer gather
      D Convert layer reshape
      W Tensor b'yamnet_frames/tf_op_layer_GatherV2_2/GatherV2_2;StatefulPartitionedCall/yamnet_frames/tf_op_layer_GatherV2_2/GatherV2_2;yamnet_frames/tf_op_layer_split_3/split_3/split_dim;StatefulPartitionedCall/yamnet_frames/tf_op_layer_split_3/split_3/split_dim' has no buffer, init to zeros.
      W Tensor b'yamnet_frames/tf_op_layer_Reshape_11/Reshape_11;StatefulPartitionedCall/yamnet_frames/tf_op_layer_Reshape_11/Reshape_11' has no buffer, init to zeros.
      D Convert layer mul
      D Convert layer shape
      D Convert layer strided_slice
      D Convert layer sub
      D Convert layer floor_div
      D Convert layer sub
      D Convert layer pack
      D Convert layer pack
      D Convert layer pad
      W Tensor b'yamnet_frames/tf_op_layer_Pad_3/paddings/Pad_3/paddings;StatefulPartitionedCall/yamnet_frames/tf_op_layer_Pad_3/paddings/Pad_3/paddings' has no buffer, init to zeros.
      D Convert layer fully_connected
      D Convert layer mul
      D Convert layer fully_connected
      D Convert layer mul
      D Convert layer add
      D Convert layer sqrt
      D Convert layer fully_connected
      D Convert layer log
      D Convert layer shape
      D Convert layer zeros_like
      D Convert layer split_v
      D Convert layer reshape
      W Tensor b'yamnet_frames/tf_op_layer_split_3/split_3;StatefulPartitionedCall/yamnet_frames/tf_op_layer_split_3/split_31' has no buffer, init to zeros.
      W Tensor b'yamnet_frames/tf_op_layer_Reshape_12/Reshape_12;StatefulPartitionedCall/yamnet_frames/tf_op_layer_Reshape_12/Reshape_12' has no buffer, init to zeros.
      D Convert layer floor_div
      D Convert layer mul
      D Convert layer pack
      D Convert layer pack
      D Convert layer sub
      D Convert layer floor_div
      D Convert layer add
      D Convert layer maximum
      D Convert layer range
      D Convert layer mul
      D Convert layer pack
      D Convert layer reshape
      W Tensor b'yamnet_frames/tf_op_layer_Mul_13/Mul_13;StatefulPartitionedCall/yamnet_frames/tf_op_layer_Mul_13/Mul_13' has no buffer, init to zeros.
      W Tensor b'yamnet_frames/tf_op_layer_Reshape_14/Reshape_14;StatefulPartitionedCall/yamnet_frames/tf_op_layer_Reshape_14/Reshape_14' has no buffer, init to zeros.
      D Convert layer add
      D Convert layer pack
      D Convert layer concatenation
      D Convert layer concatenation
      D Convert layer concatenation
      D Convert layer strided_slice
      W Tensor b'yamnet_frames/tf_op_layer_ZerosLike_3/ZerosLike_3;StatefulPartitionedCall/yamnet_frames/tf_op_layer_ZerosLike_3/ZerosLike_3' has no buffer, init to zeros.
      W Tensor b'yamnet_frames/tf_op_layer_concat_9/concat_9;StatefulPartitionedCall/yamnet_frames/tf_op_layer_concat_9/concat_9' has no buffer, init to zeros.
      D Convert layer reshape
      W Tensor b'yamnet_frames/tf_op_layer_StridedSlice_3/StridedSlice_3;StatefulPartitionedCall/yamnet_frames/tf_op_layer_StridedSlice_3/StridedSlice_31' has no buffer, init to zeros.
      W Tensor b'yamnet_frames/tf_op_layer_Reshape_13/Reshape_13;StatefulPartitionedCall/yamnet_frames/tf_op_layer_Reshape_13/Reshape_13' has no buffer, init to zeros.
      D Convert layer gather
      D Convert layer reshape
      W Tensor b'yamnet_frames/tf_op_layer_GatherV2_3/GatherV2_3;StatefulPartitionedCall/yamnet_frames/tf_op_layer_GatherV2_3/GatherV2_3;yamnet_frames/tf_op_layer_split_3/split_3/split_dim;StatefulPartitionedCall/yamnet_frames/tf_op_layer_split_3/split_3/split_dim' has no buffer, init to zeros.
      W Tensor b'yamnet_frames/tf_op_layer_Reshape_15/Reshape_15;StatefulPartitionedCall/yamnet_frames/tf_op_layer_Reshape_15/Reshape_15' has no buffer, init to zeros.
      D Convert layer shape
      D Convert layer strided_slice
      D Convert layer pack
      D Convert layer reshape
      W Tensor b'yamnet_frames/tf_op_layer_GatherV2_3/GatherV2_3;StatefulPartitionedCall/yamnet_frames/tf_op_layer_GatherV2_3/GatherV2_3;yamnet_frames/tf_op_layer_split_3/split_3/split_dim;StatefulPartitionedCall/yamnet_frames/tf_op_layer_split_3/split_3/split_dim' has no buffer, init to zeros.
      W Tensor b'yamnet_frames/reshape_1/Reshape;StatefulPartitionedCall/yamnet_frames/reshape_1/Reshape' has no buffer, init to zeros.
      D Convert layer conv_2d
      D Convert layer depthwise_conv_2d
      D Convert layer conv_2d
      D Convert layer depthwise_conv_2d
      D Convert layer conv_2d
      D Convert layer depthwise_conv_2d
      D Convert layer conv_2d
      D Convert layer depthwise_conv_2d
      D Convert layer conv_2d
      D Convert layer depthwise_conv_2d
      D Convert layer conv_2d
      D Convert layer depthwise_conv_2d
      D Convert layer conv_2d
      D Convert layer depthwise_conv_2d
      D Convert layer conv_2d
      D Convert layer depthwise_conv_2d
      D Convert layer conv_2d
      D Convert layer depthwise_conv_2d
      D Convert layer conv_2d
      D Convert layer depthwise_conv_2d
      D Convert layer conv_2d
      D Convert layer depthwise_conv_2d
      D Convert layer conv_2d
      D Convert layer depthwise_conv_2d
      D Convert layer conv_2d
      D Convert layer depthwise_conv_2d
      D Convert layer conv_2d
      D Convert layer mean
      D Convert layer fully_connected
      D Convert layer logistic
      E Invalid tensor id(1), tensor(@yamnet_frames/tf_op_layer_Pad_2/paddings/Pad_2/paddings_StatefulPartitionedCall/yamnet_frames/tf_op_layer_Pad_2/paddings/Pad_2/paddings_15:out0)
      W ----------------Error(1),Warning(25)----------------
      Traceback (most recent call last):
      File "pegasus.py", line 131, in <module>
      File "pegasus.py", line 112, in main
      File "acuitylib/app/importer/commands.py", line 226, in execute
      File "acuitylib/vsi_nn.py", line 103, in load_tflite
      File "acuitylib/app/importer/import_tflite.py", line 26, in run
      File "acuitylib/converter/lite/tfliteloader.py", line 87, in load
      File "acuitylib/converter/lite/tfliteloader.py", line 621, in parse
      File "acuitylib/converter/lite/tfliteloader.py", line 543, in _build_connections
      File "acuitylib/layer/acuitylayer.py", line 242, in add_input
      File "acuitylib/layer/acuitylayer.py", line 44, in add
      File "acuitylib/acuitylog.py", line 259, in e
      acuitylib.acuityerror.AcuityError: ('Invalid tensor id(1), tensor(@yamnet_frames/tf_op_layer_Pad_2/paddings/Pad_2/paddings_StatefulPartitionedCall/yamnet_frames/tf_op_layer_Pad_2/paddings/Pad_2/paddings_15:out0)', None)
      [3570] Failed to execute script 'pegasus' due to unhandled exception!
      running@ubuntu:/home/work/test/yamnet$

      发布在 V Series
      R
      running