-
Download and install the xCode11 realese for Swift for Tensorflow from https://github.com/tensorflow/swift/blob/master/Installation.md
-
Install xcode11 beta on your machine.
-
Make a MacOS command line tool project
-
Open your project in xCode 11 and set the toolchain to use the one you just downloaded.
-
In your projects build settings
- Add /Library/Developer/Toolchains/swift-tensorflow-RELEASE-0.4.xctoolchain/usr/lib/swift/macosx to your Runpath Search Paths
- Change the optimization level in the Swift Compiler - Code generation Section to -O
-
Add libtensorflow.so and libtensorflow_framework.so to Link Binary With Libraries in Build Phases, these libraries are located in /Library/Developer/Toolchains/swift-tensorflow-RELEASE-0.4.xctoolchain/usr/lib/swift/macosx
-
In File > Project Settings change build system to a legacy build system.
-
Try import TensortFlow and import Python and make sure you can compile and run (if you cant cry a little and throw a tantram and mayber xcode will have pity)
-
Check which version of python your tensorflow is using by typing
import Python print(Python.version)
Make sure all python libraries you want to used are installed for that version of python (just pip/pip3 install)
-
Notifications
You must be signed in to change notification settings - Fork 0
meirrosendorff/swiftForTensorFlowWorkshop
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
This workshop covers the swift for TensorFlow python interoperability and trains a model entirely in swift and then uses it in an IOS App.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published