TensorFlow C++ Bindings for Swift
##Using CCTensorFlow Add that dependency to your Package.swift file. That module makes bridge to libtensorflow library.
let package = Package(
name: "YourProject",
dependencies: [
.package(url: "git@github.com:Octadero/CCTensorFlow.git", from: "0.0.9")
]
)
On Linux OS you could install library from sources.
On mac OS you could install library from sources.
Some tips you could find on Octadero site.
In case, installing from sources:
To make interaction more easy, copy tensorflow_cc.pc
file to your pkgconfig folder. That is way to avoid setting all compile flags at build phase.
Before that, set tensorflow_path property in tensorflow_cc.pc
file to your tensorflow library path.
sudo copy tensorflow_cc.pc /usr/local/lib/pkgconfig/
Don't forget to use -std=c++11
flag at building your project phase:
swift build -Xcxx -std=c++11
If you use apt or brew package manager, make shure that your tensorflow.pc
file contains only whitelisted flags.