diff options
author | Billy Lamberta <blamb@google.com> | 2018-09-19 18:50:16 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-09-19 18:54:55 -0700 |
commit | 3cd7354b6e82650ae4977fcb08d0e4f7ac9b4589 (patch) | |
tree | a2b71cf45e41da3a3e9cd9f5199b066f4faaac68 | |
parent | 1f8788143d6da8fe707f78f0660b2ebb11b87280 (diff) |
Update TF Lite subsite
PiperOrigin-RevId: 213737482
18 files changed, 227 insertions, 81 deletions
diff --git a/tensorflow/contrib/lite/g3doc/_book.yaml b/tensorflow/contrib/lite/g3doc/_book.yaml index 1dffe30790..6f56e3139f 100644 --- a/tensorflow/contrib/lite/g3doc/_book.yaml +++ b/tensorflow/contrib/lite/g3doc/_book.yaml @@ -14,46 +14,49 @@ upper_tabs: - name: Guide contents: - title: Overview - path: /mobile/overview - - title: Developer Guide - path: /mobile/devguide - - title: Android Demo App - path: /mobile/demo_android - - title: iOS Demo App - path: /mobile/demo_ios + path: /lite/overview + - title: Developer guide + path: /lite/devguide + - title: Android demo app + path: /lite/demo_android + - title: iOS demo app + path: /lite/demo_ios - title: Performance - path: /mobile/performance + path: /lite/performance - break: True - title: TensorFlow Lite APIs - path: /mobile/apis + path: /lite/apis - title: Custom operators - path: /mobile/custom_operators - - title: TensorFlow Lite Ops Versioning - path: /mobile/ops_versioning - - title: TensorFlow Lite Compatibility Guide - path: /mobile/tf_ops_compatibility - - title: List of Hosted Models - path: /mobile/models + path: /lite/custom_operators + - title: TensorFlow Lite ops versioning + path: /lite/ops_versioning + - title: TensorFlow Lite compatibility guide + path: /lite/tf_ops_compatibility + - title: List of hosted models + path: /lite/models - title: TensorFlow Lite for iOS - path: /mobile/ios + path: /lite/ios - title: TensorFlow Lite for Raspberry Pi - path: /mobile/rpi + path: /lite/rpi - - heading: TF Mobile + - title: TF Mobile + style: accordion status: deprecated - - title: Overview - path: /mobile/tfmobile/ - - title: Building TensorFlow on Android - path: /mobile/tfmobile/android_build - - title: Building TensorFlow on IOS - path: /mobile/tfmobile/ios_build - - title: Integrating TensorFlow libraries - path: /mobile/tfmobile/linking_libs - - title: Preparing models for mobile deployment - path: /mobile/tfmobile/prepare_models - - title: Optimizing for mobile - path: /mobile/tfmobile/optimizing + section: + - title: Overview + path: /lite/tfmobile/ + - title: Building TensorFlow on Android + path: /lite/tfmobile/android_build + - title: Building TensorFlow on IOS + path: /lite/tfmobile/ios_build + - title: Integrating TensorFlow libraries + path: /lite/tfmobile/linking_libs + - title: Preparing models for mobile deployment + path: /lite/tfmobile/prepare_models + - title: Optimizing for mobile + path: /lite/tfmobile/optimizing - name: API contents: - - include: /mobile/api_docs/python/_toc.yaml + - title: API + path: /api_docs/python/tf/contrib/lite diff --git a/tensorflow/contrib/lite/g3doc/_index.yaml b/tensorflow/contrib/lite/g3doc/_index.yaml index b3f21e21ac..bc66cc5dc1 100644 --- a/tensorflow/contrib/lite/g3doc/_index.yaml +++ b/tensorflow/contrib/lite/g3doc/_index.yaml @@ -1,60 +1,209 @@ -book_path: /mobile/_book.yaml -project_path: /mobile/_project.yaml +project_path: /lite/_project.yaml +book_path: /lite/_book.yaml description: <!--no description--> landing_page: + custom_css_path: /site-assets/css/style.css rows: - - heading: TensorFlow Lite is a lightweight solution for mobile and embedded devices. + - heading: TensorFlow Lite is for mobile and embedded devices. + description: > + <p style="max-width: 75%;"> + TensorFlow Lite is the official solution for running machine learning + models on mobile and embedded devices. It enables on‑device machine + learning inference with low latency and a small binary size on Android, + iOS, and other operating systems. + </p> + <style> + .tfo-landing-row-heading { + padding-top: 0 !important; + } + .tfo-landing-row-heading h2 { + margin-top: 0 !important; + } + .tfo-landing-row-heading-list ol, .tfo-landing-row-heading-list ul { + margin-top: 0; + } + </style> + + - classname: tfo-landing-row-heading tfo-landing-row-heading-list + heading: Many benefits + description: > + On-device ML inference is difficult because of the many constraints—TensorFlow Lite can solve these: items: - - classname: devsite-landing-row-50 - description: > - TensorFlow Lite is TensorFlow’s lightweight solution for mobile and - embedded devices. It enables on-device machine learning inference with - low latency and a small binary size. TensorFlow Lite also supports - hardware acceleration with the - <a href='https://developer.android.com/ndk/guides/neuralnetworks/index.html'>Android Neural Networks API</a>. - list: - - heading: Key point 1 + - list: + - heading: Performance + description: > + TF Lite is fast with no noticeable accuracy loss—see the <a href="./performance">metrics</a>. + icon: + icon_name: lens + foreground: theme + - heading: Portability description: > - [high-level overview] + <a href="https://developer.android.com/ndk/guides/neuralnetworks/" class="external">Android</a>, + iOS, and more specialized IoT devices. icon: - icon_name: chevron_right + icon_name: lens foreground: theme - background: grey - - heading: Key point 2 + - list: + - heading: Low latency description: > - [high-level overview] + Optimized float- and fixed-point CPU kernels, op‑fusing, and more. icon: - icon_name: chevron_right + icon_name: lens foreground: theme - background: grey - - heading: Key point 3 + - heading: Acceleration description: > - [high-level overview] + Integration with GPU and internal/external accelerators. icon: - icon_name: chevron_right + icon_name: lens foreground: theme - background: grey - code_block: | - <pre class = "prettyprint"> - $ toco --input_file=$(pwd)/mobilenet_v1_1.0_224/frozen_graph.pb \ - --input_format=TENSORFLOW_GRAPHDEF \ - --output_format=TFLITE \ - --output_file=/tmp/mobilenet_v1_1.0_224.tflite \ - --inference_type=FLOAT \ - --input_type=FLOAT \ - --input_arrays=input \ - --output_arrays=MobilenetV1/Predictions/Reshape_1 \ - --input_shapes=1,224,224,3 - </pre> + - list: + - heading: Small model size + description: > + Controlled dependencies, <a href="https://medium.com/tensorflow/introducing-the-model-optimization-toolkit-for-tensorflow-254aca1ba0a3" class="external">quantization</a>, + and op registration. + icon: + icon_name: lens + foreground: theme + - heading: Tooling + description: > + Conversion, compression, benchmarking, power-consumption, and more. + icon: + icon_name: lens + foreground: theme + + - classname: devsite-landing-row-logos tfo-landing-row-heading + heading: Companies using TensorFlow Lite + items: + - custom_image: + path: ./images/landing-page/photos_logo.png + path: https://www.photos.google.com + - custom_image: + path: ./images/landing-page/gboard_logo.png + path: https://play.google.com/store/apps/details?id=com.google.android.inputmethod.latin&hl=en_US + - custom_image: + path: ./images/landing-page/gmail_logo.png + path: https://www.google.com/gmail/ + - custom_image: + path: ./images/landing-page/assistant_logo.png + path: https://assistant.google.com/ + + - classname: devsite-landing-row-logos + items: + - custom_image: + path: ./images/landing-page/vsco_logo.png + path: https://vsco.co + - custom_image: + path: ./images/landing-page/shazam_logo.png + path: https://www.shazam.com/ + - custom_image: + path: ./images/landing-page/nest_logo.png + path: https://nest.com/ + - custom_image: + path: ./images/landing-page/loseit_logo.png + path: https://www.loseit.com/ + + - classname: devsite-landing-row-no-image-background devsite-landing-row-67 + background: grey + items: + - description: > + <em>“TensorFlow Lite helped us introduce machine learning and AI into our + app in an easy and streamlined way. We could reduce the size of our + models while keeping the accuracy high. This helped us create an amazing + fishing experience for our users by allowing them to identify any fish + species with just a photo.”</em> + image_path: ./images/landing-page/fishbrain_logo_big.png + + - heading: How it works + items: + - heading: Build + icon: + icon_name: build + description: > + Build a new model or retrain an existing one, such as using transfer learning. + buttons: + - label: Read the developer guide + path: /lite/devguide + classname: button button-primary tfo-button-primary + - heading: Convert + icon: + icon_name: autorenew + description: > + Convert a TensorFlow model into a compressed flat buffer with the + TensorFlow Lite Optimizing Converter (TOCO). + buttons: + - label: Read the TOCO guide + path: https://github.com/tensorflow/tensorflow/blob/master/tensorflow/contrib/lite/toco/g3doc/python_api.md + classname: button button-primary tfo-button-primary + - heading: Deploy + icon: + icon_name: bolt + description: > + Take the compressed <code>.tflite</code> file and load it into a mobile + or embedded device.<br/> + See the <a href="#build-your-first-tensorflow-lite-app">tutorials below</a> to build an app. + + - heading: Build your first TensorFlow Lite app + background: grey + items: + - classname: tfo-landing-row-item-inset-white + heading: Get started + description: > + <ul> + <li>Beginner: <a href="https://codelabs.developers.google.com/codelabs/tensorflow-for-poets/" class="external">TensorFlow for Poets</a></li> + <li>Beginner: <a href="https://codelabs.developers.google.com/codelabs/tensorflow-for-poets-2-tflite/" class="external">TensorFlow for Poets 2: Android</a></li> + <li>Beginner: <a href="https://codelabs.developers.google.com/codelabs/tensorflow-for-poets-2-ios/" class="external">TensorFlow for Poets 2: iOS </a></li> + <li>Intermediate: <a href="https://medium.com/tensorflow/training-and-serving-a-realtime-mobile-object-detector-in-30-minutes-with-cloud-tpus-b78971cf1193" class="external">Object detection tutorial</a> + </ul> + - classname: tfo-landing-row-item-inset-white + heading: Share your TensorFlow Lite story + description: > + We love to hear what you're working on—it may even get highlighted on + our social media! <a href="https://groups.google.com/a/tensorflow.org/forum/#!forum/discuss" class="external">Tell us</a>. + + - classname: devsite-landing-row-no-image-background devsite-landing-row-67 + items: + - description: > + <p> + <em>“The release of TensorFlow Lite has allowed us to deploy an engaging + real-time experience to our users that eliminates the requirement + for a data connection. TensorFlow Lite’s ability to compress and + optimize the TensorFlow graph for mobile deployment has been + transformative in expanding the capabilities of Snap It.</em> + </p> + <p> + <em>Through TensorFlow Lite, our users can now enjoy a state of the + art, computer-vision-based food logging experience without worrying + about signal strength. We look forward to future collaborations + with the TensorFlow Lite team.”</em> + </p> + image_path: ./images/landing-page/loseit_logo_big.png - classname: devsite-landing-row-cards + background: grey + heading: Updates items: + - heading: Introducing the Model Optimization Toolkit + image_path: /ecosystem/images/tf-logo-card-16x9.png + path: https://medium.com/tensorflow/introducing-the-model-optimization-toolkit-for-tensorflow-254aca1ba0a3 + buttons: + - label: Read on TensorFlow blog + path: https://medium.com/tensorflow/introducing-the-model-optimization-toolkit-for-tensorflow-254aca1ba0a3 + - heading: East Africa Cassava App + image_path: ./images/landing-page/detect_crop_disease_in_africa.png + path: https://heartbeat.fritz.ai/community-spotlight-nuru-a-mobile-app-by-plantvillage-to-detect-crop-disease-in-africa-28d142bf63d5 + buttons: + - label: Read more + path: https://heartbeat.fritz.ai/community-spotlight-nuru-a-mobile-app-by-plantvillage-to-detect-crop-disease-in-africa-28d142bf63d5 - heading: Using TensorFlow Lite on Android image_path: /ecosystem/images/tf-logo-card-16x9.png path: https://medium.com/tensorflow/using-tensorflow-lite-on-android-9bbc9cb7d69d buttons: - label: Read on TensorFlow blog path: https://medium.com/tensorflow/using-tensorflow-lite-on-android-9bbc9cb7d69d + + - classname: devsite-landing-row-cards + background: grey + items: - heading: TensorFlow Lite at the Dev Summit youtube_id: FAMfy7izB6A buttons: @@ -66,3 +215,4 @@ landing_page: buttons: - label: View on GitHub path: https://github.com/tensorflow/tensorflow/tree/master/tensorflow/contrib/lite + - classname: devsite-landing-row-item-hidden diff --git a/tensorflow/contrib/lite/g3doc/_project.yaml b/tensorflow/contrib/lite/g3doc/_project.yaml index b39666516b..d48d07be04 100644 --- a/tensorflow/contrib/lite/g3doc/_project.yaml +++ b/tensorflow/contrib/lite/g3doc/_project.yaml @@ -1,6 +1,6 @@ name: TensorFlow Lite -breadcrumb_name: Mobile -home_url: /mobile/ +breadcrumb_name: TensorFlow Lite +home_url: /lite/ parent_project_metadata_path: /_project.yaml description: > TensorFlow Lite is a lightweight solution for mobile and embedded devices. diff --git a/tensorflow/contrib/lite/g3doc/api_docs/python/_toc.yaml b/tensorflow/contrib/lite/g3doc/api_docs/python/_toc.yaml deleted file mode 100644 index 1e1c44c692..0000000000 --- a/tensorflow/contrib/lite/g3doc/api_docs/python/_toc.yaml +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated file; please do not edit -toc: - - title: TensorFlow Lite - section: - - title: Overview - path: /mobile/api_docs/python/ diff --git a/tensorflow/contrib/lite/g3doc/devguide.md b/tensorflow/contrib/lite/g3doc/devguide.md index 90e7915c52..0eed516000 100644 --- a/tensorflow/contrib/lite/g3doc/devguide.md +++ b/tensorflow/contrib/lite/g3doc/devguide.md @@ -1,5 +1,4 @@ - -# Developer Guide +# TF Lite Developer Guide Using a TensorFlow Lite model in your mobile app requires multiple considerations: you must choose a pre-trained or custom model, convert the model @@ -55,7 +54,7 @@ both floating point and quantized inference. ### Train a custom model A developer may choose to train a custom model using Tensorflow (see the -[TensorFlow tutorials](../../tutorials/) for examples of building and training +[TensorFlow tutorials](../tutorials/) for examples of building and training models). If you have already written a model, the first step is to export this to a `tf.GraphDef` file. This is required because some formats do not store the model structure outside the code, and we must communicate with other parts of the @@ -205,7 +204,7 @@ The open source Android demo app uses the JNI interface and is available [on GitHub](https://github.com/tensorflow/tensorflow/tree/master/tensorflow/contrib/lite/java/demo/app). You can also download a [prebuilt APK](http://download.tensorflow.org/deps/tflite/TfLiteCameraDemo.apk). -See the <a href="../demo_android.md">Android demo</a> guide for details. +See the <a href="./demo_android.md">Android demo</a> guide for details. The <a href="./android_build.md">Android mobile</a> guide has instructions for installing TensorFlow on Android and setting up `bazel` and Android Studio. @@ -214,7 +213,7 @@ installing TensorFlow on Android and setting up `bazel` and Android Studio. To integrate a TensorFlow model in an iOS app, see the [TensorFlow Lite for iOS](https://github.com/tensorflow/tensorflow/tree/master/tensorflow/contrib/lite/g3doc/ios.md) -guide and <a href="../demo_ios.md">iOS demo</a> guide. +guide and <a href="./demo_ios.md">iOS demo</a> guide. #### Core ML support diff --git a/tensorflow/contrib/lite/g3doc/images/landing-page/assistant_logo.png b/tensorflow/contrib/lite/g3doc/images/landing-page/assistant_logo.png Binary files differnew file mode 100644 index 0000000000..ced0872ab2 --- /dev/null +++ b/tensorflow/contrib/lite/g3doc/images/landing-page/assistant_logo.png diff --git a/tensorflow/contrib/lite/g3doc/images/landing-page/detect_crop_disease_in_africa.png b/tensorflow/contrib/lite/g3doc/images/landing-page/detect_crop_disease_in_africa.png Binary files differnew file mode 100644 index 0000000000..45b3b4f6fe --- /dev/null +++ b/tensorflow/contrib/lite/g3doc/images/landing-page/detect_crop_disease_in_africa.png diff --git a/tensorflow/contrib/lite/g3doc/images/landing-page/fishbrain_logo.png b/tensorflow/contrib/lite/g3doc/images/landing-page/fishbrain_logo.png Binary files differnew file mode 100644 index 0000000000..bc1bf6e1e7 --- /dev/null +++ b/tensorflow/contrib/lite/g3doc/images/landing-page/fishbrain_logo.png diff --git a/tensorflow/contrib/lite/g3doc/images/landing-page/fishbrain_logo_big.png b/tensorflow/contrib/lite/g3doc/images/landing-page/fishbrain_logo_big.png Binary files differnew file mode 100644 index 0000000000..d76fca86a9 --- /dev/null +++ b/tensorflow/contrib/lite/g3doc/images/landing-page/fishbrain_logo_big.png diff --git a/tensorflow/contrib/lite/g3doc/images/landing-page/gboard_logo.png b/tensorflow/contrib/lite/g3doc/images/landing-page/gboard_logo.png Binary files differnew file mode 100644 index 0000000000..f1a93ab763 --- /dev/null +++ b/tensorflow/contrib/lite/g3doc/images/landing-page/gboard_logo.png diff --git a/tensorflow/contrib/lite/g3doc/images/landing-page/gmail_logo.png b/tensorflow/contrib/lite/g3doc/images/landing-page/gmail_logo.png Binary files differnew file mode 100644 index 0000000000..21aa2c84ea --- /dev/null +++ b/tensorflow/contrib/lite/g3doc/images/landing-page/gmail_logo.png diff --git a/tensorflow/contrib/lite/g3doc/images/landing-page/loseit_logo.png b/tensorflow/contrib/lite/g3doc/images/landing-page/loseit_logo.png Binary files differnew file mode 100644 index 0000000000..b6b3d14df9 --- /dev/null +++ b/tensorflow/contrib/lite/g3doc/images/landing-page/loseit_logo.png diff --git a/tensorflow/contrib/lite/g3doc/images/landing-page/loseit_logo_big.png b/tensorflow/contrib/lite/g3doc/images/landing-page/loseit_logo_big.png Binary files differnew file mode 100644 index 0000000000..b3e46d4bd8 --- /dev/null +++ b/tensorflow/contrib/lite/g3doc/images/landing-page/loseit_logo_big.png diff --git a/tensorflow/contrib/lite/g3doc/images/landing-page/nest_logo.png b/tensorflow/contrib/lite/g3doc/images/landing-page/nest_logo.png Binary files differnew file mode 100644 index 0000000000..35bfd97373 --- /dev/null +++ b/tensorflow/contrib/lite/g3doc/images/landing-page/nest_logo.png diff --git a/tensorflow/contrib/lite/g3doc/images/landing-page/photos_logo.png b/tensorflow/contrib/lite/g3doc/images/landing-page/photos_logo.png Binary files differnew file mode 100644 index 0000000000..4333426dfe --- /dev/null +++ b/tensorflow/contrib/lite/g3doc/images/landing-page/photos_logo.png diff --git a/tensorflow/contrib/lite/g3doc/images/landing-page/shazam_logo.png b/tensorflow/contrib/lite/g3doc/images/landing-page/shazam_logo.png Binary files differnew file mode 100644 index 0000000000..6ec412c75c --- /dev/null +++ b/tensorflow/contrib/lite/g3doc/images/landing-page/shazam_logo.png diff --git a/tensorflow/contrib/lite/g3doc/images/landing-page/vsco_logo.png b/tensorflow/contrib/lite/g3doc/images/landing-page/vsco_logo.png Binary files differnew file mode 100644 index 0000000000..f408f9024b --- /dev/null +++ b/tensorflow/contrib/lite/g3doc/images/landing-page/vsco_logo.png diff --git a/tensorflow/contrib/lite/g3doc/tfmobile/index.md b/tensorflow/contrib/lite/g3doc/tfmobile/index.md index d003bb2f38..49ad35d4e6 100644 --- a/tensorflow/contrib/lite/g3doc/tfmobile/index.md +++ b/tensorflow/contrib/lite/g3doc/tfmobile/index.md @@ -4,7 +4,7 @@ TensorFlow was designed to be a good deep learning solution for mobile platforms. Currently we have two solutions for deploying machine learning applications on mobile and embedded devices: TensorFlow for Mobile and -<a href="../index.md">TensorFlow Lite</a>. +<a href="../../lite">TensorFlow Lite</a>. ## TensorFlow Lite versus TensorFlow Mobile |