Tensorflow data structures generated from protobuf definitions
using swift-protobuf & using swift-grpc-protobuf
RUNME.sh will download latest tensorflow proto files / swift grpc and build protobuf files en masse.
Tensorflow data structures generated from protobuf definitions
License: MIT License
Tensorflow data structures generated from protobuf definitions
using swift-protobuf & using swift-grpc-protobuf
RUNME.sh will download latest tensorflow proto files / swift grpc and build protobuf files en masse.
this is the current python library / methods / functions
https://github.com/petewarden/tensorflow_makefile/tree/49c08e4d4ff3b6e7d99374dc2fbf8b358150ef9c/tensorflow/g3doc/api_docs/python
there isn't an equivalent python grpc library for tensorflow.
Interacting with this library via grpc is going to be like using a REST service to use tensorflow.
swift may find a home somewhere amongst the tensorflow ecosystem (backend processes) / but it's not so clear how end users can simply pick up this library and start using it to train models as is majority of use cases with people using tensorflow.
The API docs state
'Over time, we hope that the TensorFlow community will develop front ends for languages like Go, Java, JavaScript, Lua, R, and perhaps others. With SWIG, it's relatively easy to develop a TensorFlow interface for your favorite language.'
swig doesn't have swift support.
however there is an attempt to scaffold swift from cpp using this library
https://github.com/sandym/swiftpp
The current cpp library states it's use is to
'To control the execution of a graph from C++:'
using the grpc calls to mimick this behavior
'To control the execution of a graph '
is achievable, today with the grpc swift classes with enough faffing around.
but to get xcode/swift to provide the sorts of luxury of api ofpython is going to have wrap the c++ library. this has been attempted with the c api here
https://github.com/rxwei/CTensorFlow/blob/master/CTensorFlow.h
https://github.com/tensorflow/tensorflow/blob/master/tensorflow/c/c_api.h
supposedly
https://www.tensorflow.org/api_docs/cc/namespace/tensorflow#readbinaryproto
tensorflow/tensorflow#6423
(N.B. - this is a first attempt and due to limited c api - not usable)
grpc/grpc-swift#2
We need to programmatically spit out the associated service interface
Ideally using urlsession to wrap network calls - however nsurlsession.shared doesn't seem to have complete coverage for linux/ubuntu. http://stackoverflow.com/questions/38419999/swift-3-preview-2-linux-error-use-of-unresolved-identifier
So libcurl is seems like (today's) best alternative. perhaps swift 4 will close this gap? IBM has a swift wrapper around this
https://github.com/IBM-Swift/CCurl
Most recently a swifty version of libcurl was created.
https://github.com/dmcyk/SwiftyCurl/
some how - need to rework this logic - to read in any associated services.proto files
and inject respective SwiftyCurl calls / callback.
https://gist.github.com/johndpope/5883f41e6079999c3b2549eeced59edc
Could reference the objective-c wrappers that can be created using c++.
https://github.com/grpc/grpc/tree/master/src/objective-c
But the grpc/grpc project by google has abandoned this for swift - so a clean start tossing out that code base could have merit.
N.B. once this milestone is achieved - tensorflow still needs to provide documentation around using this grpc layer.
I created a basic connection / although this is failing.
Need to dive in with wireshark or something to determine why it's not connecting.
There's so
```
workerService = Tensorflow_Grpc_WorkerServiceService(address: "127.0.0.1:2222")
let request = Tensorflow_GetStatusRequest()
let status = try? workerService.getstatus(request) { (response, result) in
print(request)
print(result)
}
print("status:",status)
I think all these files by themselves probably not going to help anyone without docs.
Probably good idea to plug this in to my script.
https://github.com/estan/protoc-gen-doc
This would be nice
https://github.com/estan/protoc-gen-doc/blob/master/examples/doc/example.md
I was thinking with script - we could spit out all the libraries (c# / c++ etc )which would pick up good seo.
This library is already top page in google ranks for tensorflow swift.
More importantly - actually making progress to get this working is my intention.
Probably be best to add to readme - this link to co-ordinate efforts.
https://tensorflowtalk.slack.com/
We need a hello world sample gist of plugging in some of these scripts.
I also imagined dumping stuff into an google sheets / excel which people could look at APIs.
Maybe even do some predefined searches to gists on github
And yeah... one day this will all be superseded once Google can throw more resources at it.
But if there's enough people to get behind swift - then this could be helpful
Side note - have a look at how node implements their proto handling with grpc
It doesn't actually need protoc to spit out files
https://github.com/johndpope/DockerParseyMcParsefaceAPI/blob/master/clients/node_client/index.js#L1
grpc swift has similar thing with some script called quickproto - but need to spit out an 'output' file.
I updated my script to spit these out. (see -output appendage)
https://gist.github.com/johndpope/5d176f4eebeb7ec983fa77d945c18fb1
There is this docker file we can use as the server.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.