错误:Gpu 委托无法与 flutter 配合使用

问题描述 投票:0回答:1

我尝试使用 GpuDelegate 运行我的模型,但是在创建解释器时出现错误:
Dart 版本:Dart SDK 版本:2.19.6(稳定)
Flutter 版本:Flutter 3.7.9
tflite_flutter:^0.10。 0
Flutter 代码使用 Delegate 加载解释器

Future<Interpreter> loadModel() async {
    final options = InterpreterOptions()..threads = 6;
    // Use Metal Delegate
    // if (Platform.isIOS) {
    // options.useNnApiForAndroid = true;
    options.addDelegate(GpuDelegate());
    // }
    // Load model from assets
    final interpreter = await Interpreter.fromAsset(
        "assets/tflite/keypoint_512_320_float16_V3_1_output.tflite",
        options: options);

    return interpreter;
  }
flutter dart tensorflow tensor tflite
1个回答
0
投票

您找到并解决这个问题了吗?我目前遇到这个问题。

最新问题
© www.soinside.com 2019 - 2025. All rights reserved.