Removed unneeded #includes, and corrected README with updated paths & misc
PiperOrigin-RevId: 159146246
This commit is contained in:
parent
9bba02c6ed
commit
2745591a35
@ -20,9 +20,9 @@ mkdir -p ~/graphs
|
|||||||
curl -o ~/graphs/inception5h.zip \
|
curl -o ~/graphs/inception5h.zip \
|
||||||
https://storage.googleapis.com/download.tensorflow.org/models/inception5h.zip \
|
https://storage.googleapis.com/download.tensorflow.org/models/inception5h.zip \
|
||||||
&& unzip ~/graphs/inception5h.zip -d ~/graphs/inception5h
|
&& unzip ~/graphs/inception5h.zip -d ~/graphs/inception5h
|
||||||
cp ~/graphs/inception5h/* tensorflow/contrib/ios_examples/benchmark/data/
|
cp ~/graphs/inception5h/* tensorflow/examples/ios/benchmark/data/
|
||||||
cp ~/graphs/inception5h/* tensorflow/contrib/ios_examples/camera/data/
|
cp ~/graphs/inception5h/* tensorflow/examples/ios/camera/data/
|
||||||
cp ~/graphs/inception5h/* tensorflow/contrib/ios_examples/simple/data/
|
cp ~/graphs/inception5h/* tensorflow/examples/ios/simple/data/
|
||||||
```
|
```
|
||||||
|
|
||||||
- Change directory to one of the samples, download the TensorFlow-experimental
|
- 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
|
long time since it is big (~450MB). For example, if you want to run the
|
||||||
simple example, then:
|
simple example, then:
|
||||||
```bash
|
```bash
|
||||||
cd tensorflow/contrib/ios_examples/simple
|
cd tensorflow/ios/simple
|
||||||
pod install
|
pod install
|
||||||
open tf_simple_example.xcworkspace # obs, not the .xcodeproj directory
|
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
|
- 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
|
so big is because we are bundling multiple platforms, and the pod includes
|
||||||
all TensorFlow functionality (e.g. operations). This is convenient during
|
all TensorFlow functionality (e.g. operations). The final app size after
|
||||||
development, but see below section on how you can build your own custom
|
build is substantially smaller though (~25MB). Working with the complete
|
||||||
TensorFlow library to reduce the size.
|
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
|
### Creating Your own App
|
||||||
|
|
||||||
@ -145,10 +146,10 @@ rundown:
|
|||||||
in your project settings.
|
in your project settings.
|
||||||
|
|
||||||
- Remove any use of the `-all_load` flag in your project. The protocol buffers
|
- 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`
|
libraries (full and lite versions) contain duplicate symbols, and the
|
||||||
flag will cause these duplicates to become link errors. If you were using
|
`-all_load` flag will cause these duplicates to become link errors. If you
|
||||||
`-all_load` to avoid issues with Objective-C categories in static libraries,
|
were using `-all_load` to avoid issues with Objective-C categories in static
|
||||||
you may be able to replace it with the `-ObjC` flag.
|
libraries, you may be able to replace it with the `-ObjC` flag.
|
||||||
|
|
||||||
### Reducing the binary size
|
### 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
|
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:
|
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.
|
- 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
|
- Running this command will show the size of the executable as the
|
||||||
`tf_simple_example` line.
|
`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
|
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
|
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
|
"Other Linker Flags" used in the Simple Xcode project settings to strip the
|
||||||
|
@ -22,17 +22,7 @@
|
|||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <string>
|
#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/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/public/session.h"
|
||||||
#include "tensorflow/core/util/stat_summarizer.h"
|
#include "tensorflow/core/util/stat_summarizer.h"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user