aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/examples/ios
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2017-06-15 13:34:40 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-06-15 13:38:51 -0700
commit2745591a352e567cd16578d4b3813d00811046bb (patch)
treec40e24ecf85795c3d06c5edd66a9315f51d76a57 /tensorflow/examples/ios
parent9bba02c6ed00d59d0dc5bc9bb6f8a32662ef8103 (diff)
Removed unneeded #includes, and corrected README with updated paths & misc
PiperOrigin-RevId: 159146246
Diffstat (limited to 'tensorflow/examples/ios')
-rw-r--r--tensorflow/examples/ios/README.md27
-rw-r--r--tensorflow/examples/ios/benchmark/BenchmarkViewController.mm10
2 files changed, 14 insertions, 23 deletions
diff --git a/tensorflow/examples/ios/README.md b/tensorflow/examples/ios/README.md
index 9832399d72..a412381196 100644
--- a/tensorflow/examples/ios/README.md
+++ b/tensorflow/examples/ios/README.md
@@ -20,9 +20,9 @@ mkdir -p ~/graphs
curl -o ~/graphs/inception5h.zip \
https://storage.googleapis.com/download.tensorflow.org/models/inception5h.zip \
&& unzip ~/graphs/inception5h.zip -d ~/graphs/inception5h
-cp ~/graphs/inception5h/* tensorflow/contrib/ios_examples/benchmark/data/
-cp ~/graphs/inception5h/* tensorflow/contrib/ios_examples/camera/data/
-cp ~/graphs/inception5h/* tensorflow/contrib/ios_examples/simple/data/
+cp ~/graphs/inception5h/* tensorflow/examples/ios/benchmark/data/
+cp ~/graphs/inception5h/* tensorflow/examples/ios/camera/data/
+cp ~/graphs/inception5h/* tensorflow/examples/ios/simple/data/
```
- Change directory to one of the samples, download the TensorFlow-experimental
@@ -30,7 +30,7 @@ cp ~/graphs/inception5h/* tensorflow/contrib/ios_examples/simple/data/
long time since it is big (~450MB). For example, if you want to run the
simple example, then:
```bash
-cd tensorflow/contrib/ios_examples/simple
+cd tensorflow/ios/simple
pod install
open tf_simple_example.xcworkspace # obs, not the .xcodeproj directory
```
@@ -51,9 +51,10 @@ open tf_simple_example.xcworkspace # obs, not the .xcodeproj directory
- The TensorFlow-experimental pod is current about ~450MB. The reason it is
so big is because we are bundling multiple platforms, and the pod includes
- all TensorFlow functionality (e.g. operations). This is convenient during
- development, but see below section on how you can build your own custom
- TensorFlow library to reduce the size.
+ all TensorFlow functionality (e.g. operations). The final app size after
+ build is substantially smaller though (~25MB). Working with the complete
+ pod is convenient during development, but see below section on how you can
+ build your own custom TensorFlow library to reduce the size.
### Creating Your own App
@@ -145,10 +146,10 @@ rundown:
in your project settings.
- Remove any use of the `-all_load` flag in your project. The protocol buffers
- libraries (full and lite versions) contain duplicate symbols, and the `-all_load`
- flag will cause these duplicates to become link errors. If you were using
- `-all_load` to avoid issues with Objective-C categories in static libraries,
- you may be able to replace it with the `-ObjC` flag.
+ libraries (full and lite versions) contain duplicate symbols, and the
+ `-all_load` flag will cause these duplicates to become link errors. If you
+ were using `-all_load` to avoid issues with Objective-C categories in static
+ libraries, you may be able to replace it with the `-ObjC` flag.
### Reducing the binary size
@@ -159,7 +160,7 @@ It can be tricky to set up the right configuration in your own app to keep the
size minimized, so if you do run into this issue we recommend you start by
looking at the simple example to examine its size. Here's how you do that:
- - Open the Xcode project in tensorflow/contrib/ios_examples/simple.
+ - Open the Xcode project in tensorflow/examples/ios/simple.
- Make sure you've followed the steps above to get the data files.
@@ -181,7 +182,7 @@ looking at the simple example to examine its size. Here's how you do that:
- Running this command will show the size of the executable as the
`tf_simple_example` line.
-Right now you'll see a size of around 23 MB, since it's including two
+Right now you'll see a size of around 25 MB, since it's including two
architectures (armv7 and arm64). As a first step, you should make sure the size
increase you see in your own app is similar, and if it's larger, look at the
"Other Linker Flags" used in the Simple Xcode project settings to strip the
diff --git a/tensorflow/examples/ios/benchmark/BenchmarkViewController.mm b/tensorflow/examples/ios/benchmark/BenchmarkViewController.mm
index cab7b36f17..9fc5f6ded2 100644
--- a/tensorflow/examples/ios/benchmark/BenchmarkViewController.mm
+++ b/tensorflow/examples/ios/benchmark/BenchmarkViewController.mm
@@ -22,17 +22,7 @@
#include <sstream>
#include <string>
-//#include "google/protobuf/io/coded_stream.h"
-//#include "google/protobuf/io/zero_copy_stream_impl.h"
-//#include "google/protobuf/io/zero_copy_stream_impl_lite.h"
-//#include "google/protobuf/message_lite.h"
#include "tensorflow/core/framework/op_kernel.h"
-//#include "tensorflow/core/framework/tensor.h"
-//#include "tensorflow/core/framework/types.pb.h"
-//#include "tensorflow/core/platform/env.h"
-//#include "tensorflow/core/platform/logging.h"
-//#include "tensorflow/core/platform/mutex.h"
-//#include "tensorflow/core/platform/types.h"
#include "tensorflow/core/public/session.h"
#include "tensorflow/core/util/stat_summarizer.h"