使用未解析的标识符 'CoreMLDelegate' - TFLite

Use of unresolved identifier 'CoreMLDelegate' - TFLite

我正在使用 https://github.com/sunkeunchoi/posenet-ios 来尝试 PoseNet 和 TensorFlowLite,但是当我尝试 运行 时,我不断收到构建失败消息:未解析的标识符 'CoreMLDelegate' 用于CoreMLDelegate()(见下面的代码)。 下载后我没有对代码进行任何更改。
当我注释掉 CoreMLDelegate() swift 时,该应用程序开始运行,但我想解决该问题。 能不能下载试试,看看有没有和我一样的问题?

    switch delegate {
    case .Metal:
      delegates = [MetalDelegate()]
    case .CoreML:
        if let coreMLDelegate = CoreMLDelegate() {
        delegates = [coreMLDelegate]
      } else {
        delegates = nil
      }
    default:
      delegates = nil
    }```

看起来您正在查看官方 PoseNet 示例应用程序的用户分支。

请使用官方版本,可以在这里找到: https://github.com/tensorflow/examples/tree/master/lite/examples/posenet/ios

您可以克隆整个 tensorflow/examples 存储库,运行 pod install,然后打开 PoseNet.xcworkspace 构建应用程序。

git clone https://github.com/tensorflow/examples
cd examples/lite/examples/posenet/ios
pod install --repo-update
open PoseNet.xcworkspace   # This should open your Xcode.