Home | History | Annotate | only in /external/tensorflow/tensorflow/lite/experimental/objc
Up to higher level directory
NameDateSize
apis/22-Oct-2020
BUILD.apple22-Oct-20203.2K
README.md22-Oct-20201.6K
sources/22-Oct-2020
TensorFlowLite.tulsiproj/22-Oct-2020
tests/22-Oct-2020

README.md

      1 # TensorFlow Lite for Objective-C
      2 
      3 [TensorFlow Lite](https://www.tensorflow.org/lite/) is TensorFlow's lightweight
      4 solution for Objective-C developers. It enables low-latency inference of
      5 on-device machine learning models with a small binary size and fast performance
      6 supporting hardware acceleration.
      7 
      8 ## Getting Started
      9 
     10 ### Bazel
     11 
     12 In your `BUILD` file, add the `TensorFlowLite` dependency:
     13 
     14 ```python
     15 objc_library(
     16   deps = [
     17       "//tensorflow/lite/experimental/objc:TensorFlowLite",
     18   ],
     19 )
     20 ```
     21 
     22 If you would like to build the Objective-C TensorFlow Lite library using Bazel on Apple
     23 platforms, clone or download the [TensorFlow GitHub repo](https://github.com/tensorflow/tensorflow),
     24 then navigate to the root `tensorflow` directory and execute the `configure.py` script:
     25 
     26 ```shell
     27 python configure.py
     28 ```
     29 
     30 Follow the prompts and when asked to configure the Bazel rules for Apple
     31 platforms, enter `y`.
     32 
     33 Build the `TensorFlowLite` Objective-C library target:
     34 
     35 ```shell
     36 bazel build tensorflow/lite/experimental/objc:TensorFlowLite
     37 ```
     38 
     39 Build the `TensorFlowLiteTests` target:
     40 
     41 ```shell
     42 bazel test tensorflow/lite/experimental/objc:TensorFlowLiteTests
     43 ```
     44 
     45 ### Tulsi
     46 
     47 Open the `TensorFlowLite.tulsiproj` using the
     48 [TulsiApp](https://github.com/bazelbuild/tulsi) or by running the
     49 [`generate_xcodeproj.sh`](https://github.com/bazelbuild/tulsi/blob/master/src/tools/generate_xcodeproj.sh)
     50 script from the root `tensorflow` directory:
     51 
     52 ```shell
     53 generate_xcodeproj.sh --genconfig tensorflow/lite/experimental/objc/TensorFlowLite.tulsiproj:TensorFlowLite --outputfolder ~/path/to/generated/TensorFlowLite.xcodeproj
     54 ```
     55