Live data from Hacker News

Tensorflow sucks

nicodjimenez.github.io

71–80 of 133 posts

Re: Tensorflow sucks

#71

I'm probably being overly cynical, but this is (indistinguishable from) a "growth-hack" submarine article by the author to promote their tool. There is hardly any substantiation to support the assertions. Tucked right at the end: > If you want a beautiful monitoring solution for your machine learning project that includes advanced model comparison features, check out Losswise. I developed it to allow machine learning…

I'm actually pretty ok with these types of articles. They are generally well-researched and well-written—giving technical introductions to important concepts.

As always, it is important to be wary of the reasons that an author writes an article. If there is an advertisement at the end, then the author motivations (at least in part) are clear. But I often find that promoters of new systems and tools are able to present excellent critiques of established tools and practices. New things are USUALLY made to address the shortcomings of existing things. You as a reader have to parse whether their arguments are sound and maybe do some more research before you can make a sound judgement on the matter.

Re: Tensorflow sucks

#72

Earlier quoted context omitted.

Lmao not sure why this was down-voted. Utterly destroyed your quotation, and gave me a giggle.

It didn't "utterly destroy" the quotation. It's pretty easy to argue the virtues of cannibalism, it's just that for modern day society they do not trump the downsides. For example, cannibalism has successfully prevented death by starvation (e.g. the Donner Party), and it reduces the need for disposing of the dead. It's an application of reduce-reuse-recycle. Some species of other animals practice it as part of their…

Not to mention that implied in the quotation is being able to argue both sides of a contentious issue is important to being able to make a case strongly for the one you agree with. Totally irrelevant for generally settled questions like cannabalism, so the "utter destruction" was anything but.

Re: Tensorflow sucks

#73

Earlier quoted context omitted.

Lmao not sure why this was down-voted. Utterly destroyed your quotation, and gave me a giggle.

It didn't "utterly destroy" the quotation. It's pretty easy to argue the virtues of cannibalism, it's just that for modern day society they do not trump the downsides. For example, cannibalism has successfully prevented death by starvation (e.g. the Donner Party), and it reduces the need for disposing of the dead. It's an application of reduce-reuse-recycle. Some species of other animals practice it as part of their…

Small correction: not brain parasites, but specifically prions (misfolded protein that fascinatingly self-replicate). Kuru[1] (closely related to Creutzfeldt–Jakob disease and Alzheimer's) was extensively studied last century in the Fore people of Papua New Guinea (which were practicing cannibalism as a funerary rite), culminating in the awarding of the 1997 Nobel Prize[2] for the discovery of the prion, a completely new kind of pathogen.

It's a fascinating story! NPR has a great podcast on it.

And for what it's worth, I completely agree. I was given two key pieces of advice by two brilliant professors in my undergraduate philosophy career:

- Always be as charitable as possible with your opponents' arguments: always assume they are taking the best possible position.

- And this goes hand in hand with the above: always be ready for the best possible counter to your own argument, making sure you have an appropriate response. Few arguments are air-tight, especially for controversial issues.

[1] http://www.npr.org/sections/thesalt/2016/09/06/482952588/whe...

[2] https://www.nobelprize.org/nobel_prizes/medicine/laureates/1...

Re: Tensorflow sucks

#74

Wait, (s)he’s arguing that the code isn’t imperative enough, but the punchline is they don’t like having to type session.run? I don’t understand their vendetta against the graph, which is a powerful abstraction that lets you choose different backend, and let’s tensorboard show you an awesome view of your computation. Session.run isn’t hard to type and it takes at most a few days to grok that everything is lazily eval…

You don't even have to invoke session.run for frontends that can JIT the graph. Tensor flow in Julia is not declarative, for example.

Re: Tensorflow sucks

#75
post #2

Personally, I hate it that all these libraries are so much geared towards neural networks. Why can't we just have compute networks that can be used for anything, from computational linear algebra to deep learning? > Let’s be honest, when you have about half a dozen open source high-level libraries out there built on top of your already high-level library to make your library usable, you know something has gone terrib…

Neural Networks are a very small part of TFs API surface area. I'm writing tensorflow code every day and not doing anything remotely close to a neural network.

Re: Tensorflow sucks

#76
The serialisation story in Tensorflow is an obscene mess. There are bugs open on keras and tensorflow asking how to export a model and run it on your laptop and even better...on Android. It simply is crazy bad and cannot be done easily.

In fact, to do even half decent export of TF models, you have to switch to keras to try and do any kind of export.

I have a 10 email conversation with enterprise Google Cloud support to try and get a ML Engine output serialised to work on Android.

There are threads open all over the place on stackoverflow and elsewhere - and yes, we have tried all SIX ways.

Re: Tensorflow sucks

#77
post #8

...and that's why you are using Keras instead.

I like Keras, but I always find myself having to write TF code whenever I need to implement something more interesting. And debugging, already hard in pure TF, is more complex due to the extra layer. IMO, learning TF or pytorch is more effective at least in the current state of affairs.

But that is precisely how you should be using Keras!

* If you are implementing a standard model (that's 90% of industry use cases, and a large fraction of research use cases as well), Keras primitives considerably simplify your workflow and make you a lot more productive.

* When you need to implement something highly customized or unusual, you can revert back to writing pure TensorFlow code, which will integrate seamlessly with your Keras workflow (via custom layers, functions etc).

Basically, Keras increases your productivity for common use cases, without any flexibility cost for rare/custom use cases. It is meant to be used together with TF, not as a replacement for TF.

Re: Tensorflow sucks

#78

The serialisation story in Tensorflow is an obscene mess. There are bugs open on keras and tensorflow asking how to export a model and run it on your laptop and even better...on Android. It simply is crazy bad and cannot be done easily. In fact, to do even half decent export of TF models, you have to switch to keras to try and do any kind of export. I have a 10 email conversation with enterprise Google Cloud support…

Out of curiosity, what problems are you running into? I have never had serious problems with the 'save parameters -> dump graph -> freeze graph -> load up with C API' path with feed-forward networks or various RNNs. Either from Go or from Rust.

Admittedly, the documentation in this area is extremely bad and I basically had to figure out myself how to do it, though this was long before 1.0.

Re: Tensorflow sucks

#79

This article is not that detailed, but it's a sentiment I agree with, so I'll add one major shortcoming of Tensorflow: its memory usage is really bad. The default behavior of TF is to allocate as much GPU memory as possible for itself from the outset. There is an option (allow_growth) to only incrementally allocate memory but when I tried it recently it was broken. This means there aren't easy ways to figure out exac…

The default behavior of TF is to allocate as much GPU memory as possible for itself from the outset. There is an option (allow_growth) to only incrementally allocate memory but when I tried it recently it was broken. This means there aren't easy ways to figure out exactly how much memory TF is using (e.g. if you want to increase the batch size).

There is also per_process_gpu_memory_fraction, which limits Tensorflow to only allocate that fraction of each visible GPUs memory. It's still not great, but has been helpful in keeping resources free for models that do not need all the GPUs memory.

Post reply on HN