Skip to content

Unofficial TensorFlow cocoapod for iOS with support for inference, evaluation, and training

License

Notifications You must be signed in to change notification settings

doc-ai/tensorio-tensorflow-ios

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

78 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TensorIOTensorFlow

Unofficial TensorFlow cocoapod for iOS with support for inference, evaluation, and training. Pod targets simluator and arm64 devices only (iOS 12.0+) with full support for training MobileNetV2 models on device. We use this pod in TensorIO.

  • Latest: v2.0.9
  • TensorFlow Build: r2.0, v2.0.3

The major.minor version number of this pod tracks the major.minor version of the build of TensorFlow it includes. We reserve our patch numbers for our own changes to the build, which normally involves whitelisting additinal ops to support new models.

Requirements

  • Xcode 10.0+
  • iOS 12.0+

Installation

TensorIOTensorFlow is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'TensorIOTensorFlow'

As of v2.0.6 the pod vends only x86_64 and arm64 builds of tensorflow. You may need to add arm4 to your application's Required device capabilities in the Target > Info > Custom iOS Target Properties tab of your project. You may also need to update the Build Settings > Architectures for the project to arm64.

Notes

Based on doc.ai's tensorflow-ios-framework, this pod vends all the headers required to use TensorFlow in your project as well as the following static libraries:

For projects that use this pod be sure to add the following to your header search paths and linker flags:

Header Search Paths:

${PODS_ROOT}/TensorIOTensorFlow/Frameworks/tensorflow.framework/Headers

Linker Flags:

-force_load "${PODS_ROOT}/TensorIOTensorFlow/Frameworks/tensorflow.framework/tensorflow"

If you are using Tensor/IO with this backend, these are already added to your project. If you are developing your own pod with TensorIOTensorFlow as a dependency, you can add the following to your podspec to do this automatically:

s.xcconfig = {
  'HEADER_SEARCH_PATHS' => '"${PODS_ROOT}/TensorIOTensorFlow/Frameworks/tensorflow.framework/Headers"',
  'OTHER_LDFLAGS' => '-force_load "${PODS_ROOT}/TensorIOTensorFlow/Frameworks/tensorflow.framework/tensorflow"'
}

Build

Build this pod from scratch with the build.sh script in this repository.

Author

doc.ai

License

TensorIOTensorFlow is available under the Apache 2.0 license. See the LICENSE file for more info.

About

Unofficial TensorFlow cocoapod for iOS with support for inference, evaluation, and training

Resources

License

Stars

Watchers

Forks

Packages

No packages published