TensorFlow API in Ruby

394 views
Skip to first unread message

Ankur Yadav

unread,
Mar 4, 2016, 4:31:22 PM3/4/16
to Discuss
As a part of my GSoC project I want to implement TensorFlow API in Ruby. 
Can anyone please help me by suggesting me a how could I accomplish this? 

Regards,
Ankur

khor.s...@gmail.com

unread,
Mar 17, 2016, 12:50:08 AM3/17/16
to Discuss
Hey Ankur!

Please do apply!
Details: https://github.com/SciRuby/sciruby/wiki/Google-Summer-of-Code-2016-Ideas

For starters, read about tensor flow, which I am sure you already have, but get familiar with it more:
* Understand what and why it was created: https://www.tensorflow.org/
* The basic usage: https://www.tensorflow.org/versions/r0.7/get_started/basic_usage.html
* Install and setup (if you encounter all sorts of problems, I would recommend using Docker method): https://www.tensorflow.org/versions/r0.7/get_started/os_setup.html#download-and-setup
* Go through the basic usage using your setup
* Google has suggested using SWIG to create the API for other languages.

Best,
khor

Ankur Yadav

unread,
Mar 20, 2016, 3:37:35 PM3/20/16
to Discuss, khor.s...@gmail.com
Hi khor,

I have learnt basics of tensorflow and worked on the links you provided. I came across this project https://github.com/node-tensorflow/node-tensorflow and I think we can use similar strategy for developing Ruby APIs. I have already setup my repo for the project. https://github.com/ankurayadav/ruby-tensorflow
Now I am trying to develop some proof of concept for the project before making my GSoC proposal.

Please provide your valuable guidance for making me complete the proposal.

Regards,
Ankur Yadav

SoonHin Khor

unread,
Mar 21, 2016, 5:42:39 AM3/21/16
to Ankur Yadav, Discuss
Hey Ankur,

The node-tensorflow repo is a great find!
It will also be a great foundation to build from.
One thing to keep in mind if possible is to structure the proposal such that it can a part of a stand-alone piece of the TensorFlow Ruby API, which can be developed concurrently with other pieces.
The reason is that there may be other contributors who are non-students; some people in this thread https://github.com/tensorflow/tensorflow/issues/50 have expressed interest.

Best,
khor

Ankur Yadav

unread,
Mar 21, 2016, 9:52:34 PM3/21/16
to Discuss, khor.s...@gmail.com
Hi Khor,

I am ready with proof of idea for making Ruby-API for tensorflow. I have did something similar to node-tensorflow i.e I have made an interface to check the tensorflow version using ruby api. I have used bundler to create the gem, So now directory structure is slightly changed.

In current state:
1) We can generate tensorflow wrapper for ruby using SWIG file https://github.com/ankurayadav/ruby-tensorflow/blob/master/tensorflow.i
2) For creating the wrapper we have to execute https://github.com/ankurayadav/ruby-tensorflow/blob/master/generate.sh
3) After the execution tf.cpp file will be generated and stored in ext/tf https://github.com/ankurayadav/ruby-tensorflow/blob/master/ext/tf/tf.cpp
4) And then from parent directory we have to do bundle install, rake install, and rake spec.

Now I am concentrating on making my proposal for GSoC as very less time is left. May be I will need some guidance from you for completing my proposal. I am planning to target all C++ apis to be covered in GSoC time span.

Regards,
Ankur Yadav

SoonHin Khor

unread,
Mar 21, 2016, 10:12:23 PM3/21/16
to Ankur Yadav, Discuss
Ankur,

That is a great start!
We are looking forward to your GSoC proposal.
If you could think of ways to propose the project such that other people can also contribute concurrently it will be great.
One way to do that would be split APIs into independent portions so they can be worked on independently and concurrently.

khor

Ankur Yadav

unread,
Mar 23, 2016, 9:02:32 PM3/23/16
to Discuss, khor.s...@gmail.com
Hi Khor,

I have submitted my draft for GSoC-2016 please review it so that I can make any improvements if required.

Thanks,
Ankur Yadav 

SoonHin Khor

unread,
Mar 23, 2016, 9:59:56 PM3/23/16
to Ankur Yadav, Discuss
Ankur,

Thanks for your hard work!
I will let you know once it appears on the proposal board, and give you feedback the best way I can.

khor
Reply all
Reply to author
Forward
0 new messages