tree: ce1d0f204206b8d53418feb5b646a9b9dcdfbb11 [path history] [tgz]
  1. apis/
  2. sources/
  3. TensorFlowLite.tulsiproj/
  4. tests/
  5. BUILD.apple
  6. README.md
tensorflow/lite/experimental/objc/README.md

TensorFlow Lite for Objective-C

TensorFlow Lite is TensorFlow's lightweight solution for Objective-C developers. It enables low-latency inference of on-device machine learning models with a small binary size and fast performance supporting hardware acceleration.

Getting Started

Bazel

In your BUILD file, add the TensorFlowLite dependency:

objc_library(
  deps = [
      "//tensorflow/lite/experimental/objc:TensorFlowLite",
  ],
)

If you would like to build the Objective-C TensorFlow Lite library using Bazel on Apple platforms, clone or download the TensorFlow GitHub repo, then navigate to the root tensorflow directory and execute the configure.py script:

python configure.py

Follow the prompts and when asked to configure the Bazel rules for Apple platforms, enter y.

Build the TensorFlowLite Objective-C library target:

bazel build tensorflow/lite/experimental/objc:TensorFlowLite

Build the TensorFlowLiteTests target:

bazel test tensorflow/lite/experimental/objc:TensorFlowLiteTests

Tulsi

Open the TensorFlowLite.tulsiproj using the TulsiApp or by running the generate_xcodeproj.sh script from the root tensorflow directory:

generate_xcodeproj.sh --genconfig tensorflow/lite/experimental/objc/TensorFlowLite.tulsiproj:TensorFlowLite --outputfolder ~/path/to/generated/TensorFlowLite.xcodeproj