关于mediapipe的疑问

关于python中mediapipe的疑问

出现问题

Feedback manager requires a model with a single signature inference. Disabling support for feedback tensors.

问题来源

.venv/Lib/site-packages/mediapipe/calculators/tensor/inference_feedback_manager.cc
的签名有多个??
完整问题:
INFO: Created TensorFlow Lite XNNPACK delegate for CPU.
WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
W0000 00:00:1718077239.527317 22164 inference_feedback_manager.cc:114] Feedback manager requires a model with a single signature inference. Disabling support for feedback tensors.
W0000 00:00:1718077239.549830 22164 inference_feedback_manager.cc:114] Feedback manager requires a model with a single signature inference. Disabling support for feedback tensors.
在这里插入图片描述

尝试解决并失败

尝试修改对应的.cc文件报错仍然存在

  //修改源码,对多个签名时使用第一个签名
  if (input_output_tensor_names_map.empty()) {
    ABSL_LOG(WARNING) << "No input output tensor names provided. Unable to create feedback indices.";
    return absl::InvalidArgumentError("Input output tensor names map is empty.");
  }
  for (const auto& io_mapping : input_output_tensor_names_map) {
    const std::string& output_tensor_name = io_mapping.second;
    const int model_tensor_index = GetModelTensorIndex(io_config, output_tensor_name);
    if (model_tensor_index >= 0) {
      TensorFeedbackIndicesLink indices_link;
      indices_link.output_tensor_name = output_tensor_name;
      indices_link.model_tensor_index = model_tensor_index;
      indices_links.push_back(indices_link);
    } else {
      ABSL_LOG(WARNING) << "Cannot find model tensor index for output tensor: " << output_tensor_name;
    }
  }
//  if (input_output_tensor_names_map.empty() ||
//      input_output_tensor_names_map.size() > 1) {
//    // Fail gracefully by returning an empty TensorFeedbackIndicesLink list if
//    // SignatureDef is not available or not supported.
//    ABSL_LOG(WARNING)
//        << "Feedback manager requires a model with a single signature "
//           "inference. Disabling support for feedback tensors.";
//    return indices_links;
//  }
  // Obtain reference to single-signature in input_output_tensor_names_map.

原始的文件内容

  if (input_output_tensor_names_map.empty() ||
      input_output_tensor_names_map.size() > 1) {
    // Fail gracefully by returning an empty TensorFeedbackIndicesLink list if
    // SignatureDef is not available or not supported.
    ABSL_LOG(WARNING)
        << "Feedback manager requires a model with a single signature "
           "inference. Disabling support for feedback tensors.";
    return indices_links;
  }
   Obtain reference to single-signature in input_output_tensor_names_map.

修改后保存未发生报错改变,报错还是一样的

有没有大佬看到帮忙解决啊!!!

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值