Skip to content

Didn't find op for builtin opcode 'FULLY_CONNECTED' version '12'. An older version of this builtin might be supported. Are you using an old TFLite binary with a newer model? tflite #296

@RROONNNN

Description

@RROONNNN
 Future<void> loadModel() async {
    try {
      final options = InterpreterOptions();

      if (useGpu) {
        try {
          if (useXNNPack) {
            if (Platform.isAndroid) {
              options.addDelegate(XNNPackDelegate());
            }
          }
          if (Platform.isIOS) {
            options.addDelegate(GpuDelegate());
          }
        } catch (e) {
          print('GPU delegate not available: $e');
        }
      }

      if (!useGpu) {
        options.threads = 4;
      }
      _interpreter = await Interpreter.fromAsset(
        modelPath,
        options: options,
      );
    } catch (e) {
      debugPrint('Error loading model: $e');
    }
  }

I got an error when loading the .tflite model in Flutter. Could you please help? Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions