Skip to main content

tflite_core 0.12.11 copy "tflite_core: ^0.12.11" to clipboard
tflite_core: ^0.12.11 copied to clipboard

TensorFlow Lite Flutter plugin provides an easy, flexible, and fast Dart API to integrate TFLite models in flutter apps across mobile and desktop platforms.

example/example.dart

import 'package:flutter/widgets.dart';
import 'package:tflite_core/tflite_core.dart';

Future<void> main() async {
  WidgetsFlutterBinding.ensureInitialized();

  // Add a float32 model with input shape [1, 5] and output shape [1, 2]
  // to assets/model.tflite and declare it in the Flutter app's pubspec.yaml.
  final interpreter = await Interpreter.fromAsset('assets/model.tflite');
  try {
    final input = [
      [1.23, 6.54, 7.81, 3.21, 2.22]
    ];
    final output = List<double>.filled(2, 0).reshape<double>([1, 2]);

    interpreter.run(input, output);
    debugPrint(output.toString());
  } finally {
    interpreter.close();
  }
}
1
likes
160
points
216
downloads

Documentation

API reference

Publisher

verified publisherkmmhanan.com

Weekly Downloads

TensorFlow Lite Flutter plugin provides an easy, flexible, and fast Dart API to integrate TFLite models in flutter apps across mobile and desktop platforms.

Repository (GitHub)
View/report issues
Contributing

License

Apache-2.0 (license)

Dependencies

ffi, flutter, path, plugin_platform_interface, quiver

More

Packages that depend on tflite_core

Packages that implement tflite_core