14 comments

[ 3.4 ms ] story [ 44.9 ms ] thread
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.
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...

For people want to learn deep learning seriously, the big O of investing your time in deep learning, tensorflow and python are like O(n^2), O(nlogn), O(n). So although thanks for the author to make it happen, I would recommend to learn python.
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.

> 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)

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.

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.

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.
I love Ruby too. Sadly, Treat and stanford-core-nlp all appear to have be broken given the latest 3.6.0 update to the Stanford NLP lib.

My approach thus far has been to write a simple wrapper script around the library (in it's native language) and then do a standard output of the result set in JSON.

Then within Ruby, I just do a `shell`, capture the result and do a JSON parse on the response. It's crude, but works reliably well, I don't have to worry about any bridge libraries supporting the latest language version.

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.
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.
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.
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.