
Tensorflow Ruby API - geospeck
https://medium.com/@Arafat./introducing-tensorflow-ruby-api-e77a477ff16e#.9b170cfil
======
matt4077
This is wonderful... I really don't feel the need to invest into learning
Python until I'm fish-in-water-proficient as I am with ruby, considering they
largely overlap in their strength and weaknesses. It'd be great if it works
with just a small adapter layer to include the python C library – otherwise
I'd be skeptical if an independent project can keep up with Facebook's pace on
Tensorflow.

~~~
oelmekki
I'm in the same situation than you (used to ruby, never used python).

Using tensorflow through its high level API, tf.contrib.learn [1] has been
easy enough. Most of the actual work is about shaping data and tweaking hyper
parameters (how many layers, how many neurons per layer, how many iterations,
etc) which is just changing the value of variables, really.

In order to build my dataset, I use ruby or golang and dump csv files.
Tutorial code already shows how to load them in python. The most python I
wrote was to figure out how to take a json string from command line argument
and decode it, in order to make prediction after the training. This took me
like fifteen minutes googling and trying, python is really accessible,
especially if you're already used to ruby.

Clearly, I do not recommend to do that for production code, but if you want to
play with tensorflow and try to get skilled at vectorizing data and curating
dataset (the most important tasks in all of this), you don't need to learn
much about python.

I do recommend though to take time and read lessons about neural networks,
because you'll need proper knowledge about it to use tensorflow.

[1]
[https://www.tensorflow.org/versions/r0.9/tutorials/tflearn/i...](https://www.tensorflow.org/versions/r0.9/tutorials/tflearn/index.html)

------
computerwizard
Ruby definitely needs more love from the AI community! Especially with
projects like JRuby really improving the performance of the language. I just
can't seem to make myself like python, ruby is just too easy to think/dream
in. I have hope we'll see some awesome scientific libraries in the future for
ruby.

------
y14
As a ruby developer who had to move to python for its data science support,
it’s very nice to see that people help Ruby to evolve into this direction.
Ruby is a beautiful language that should be expanded beyond web development
and these kind of libraries will make it happen.

But, as encouraging as it is, if your’e thinking about developing a real,
production-ready, data science project in ruby - don’t. At least not yet. The
libraries around machine learning, neural networks etc are old, unmaintained
and usually don’t even work.

~~~
Lordarminius
> if your’e thinking about developing a real, production-ready, data science
> project in ruby - don’t.

Why is this? Are there inherent limitations in the language that has Ruby
taking a backseat to Python in ML and maths/statistical applications? Or is it
just due to neglect by the community?

(I started leaning ruby about ten months ago and have only just started to
gain some proficiency, so I do not know much about the workings of the
ecosystem - or the innards of ruby for that matter)

~~~
wastedhours
I'm not sure if there are inherent language limitations (not that much of an
expert), but know there's more momentum around Python for ML/data science
work, mainly as a result of a few good resources specifically for it, which
has encouraged more libraries and developer support to focus on it.

So perhaps less about neglect from the Ruby community, and more proactive-ness
from the Python one.

~~~
oelmekki
I think the key factor here has been numpy, the scientific library for python.
Academics used python because of it, and they are the ones who wrote the
neural networks tooling.

We probably can expect to see implementations in all languages at some point.
Floating point errors are not even that a big deal since we're dealing with
statistics anyway.

That being said, neural networks are very resource/computation heavy. I wrote
one in golang and cut my execution time in half just by encoding my matrices
as flat arrays instead of two dimensional arrays. If ruby is to be used to
build neural networks, it will need to perform the big work in a binary
binding, like tensorflow does with its C++ layer.

~~~
matt4077
I doubt that anybody is thinking of actually running the networks in ruby, or
python, or even C on the GPU. They're all run on the GPU anyway.

------
dorianm
It's available at:
[https://github.com/somaticio/tensorflow.rb](https://github.com/somaticio/tensorflow.rb)

------
toisanji
hi all, we need more help on this. If you are interested in getting tensorflow
to other places besides python, this could help immensely. Especially if you
are a ruby developer. Our goal is to get tensorflow.rb to get feature parity
with tensorflow, but there is still a lot of work to do.

~~~
dragon_king
I would love to help. What is the roadmap and what do you all need help on? I
might need a little help understanding tensorflow because I have never really
used it.

------
evolve2k
Looks very interesting. Great work porting it over. I haven't downloaded the
image recognition code, but where is it getting the list of potential category
names from? And where's the related training set for the puppy for example.

