Live data from Hacker News

Tensorflow sucks

nicodjimenez.github.io

81–90 of 133 posts

Re: Tensorflow sucks

#81

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.

The issues with the high level API goes slightly deeper. It looks like some of the graph operations are not available on Android (and equivalently on the desktop) by default[1]. The motivation for this is that we have stricter requirements for computation costs and application size on different platforms. So there is an approach that allows to compile minimal set of operations required to run the graph[2][3]. However it requires Bazel as the primary build tool for the Android app as well. The good news is that the TensorFlow team understands the issue and works on improving the documentation and tooling[4].

That said, would you be able to share any example snippets on how you are persisting and loading these models in your code ? That would be super helpful.

Also, im getting the feeling that you are using the deprecated method of saving. I think they are shifting to Metagraph now (not sure about this) https://www.tensorflow.org/versions/master/api_docs/python/t...

[1] https://github.com/tensorflow/tensorflow/issues/10254 [2] https://github.com/tensorflow/tensorflow/blob/master/tensorf... [3] https://github.com/tensorflow/tensorflow/blob/master/tensorf... [4] https://github.com/tensorflow/tensorflow/issues/10299

Re: Tensorflow sucks

#82
Usually I'm on the hook for being open minded about programming languages in this forum, but I'm putting my foot down.

I really hope at some point this entire universe gets liberated from Python at some point. Even R would be more palatable. Both these examples are awful, error prone, obfuscated, and beholden to Python's difficulties with large sums of data.

Re: Tensorflow sucks

#83
post #14

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…

> I don’t understand their vendetta against the graph, which is a powerful abstraction that lets you choose different backend [...] You don't really need a graph to support different backends. One popular approach is to have different array implementations (e.g. CPU and GPU arrays). > [...] and let’s tensorboard show you an awesome view of your computation At the end of the post the author shows his API that lets you…

> You don't really need a graph to support different backends. One popular approach is to have different array implementations (e.g. CPU and GPU arrays).

And now you can (waves arms) write it twice! Alternatively, you can make the interfaces between various impls be exactly the same but rename them so they're purpose-named. Then you've written Graph, for the most part.

Re: Tensorflow sucks

#84

Earlier quoted context omitted.

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 seam…

You also created the backend abstraction that let you customize a lot without real "raw TensorFlow". Thank you Mr. Chollet.

Re: Tensorflow sucks

#85

I'm not a comp-sci grad and I worked at Google for a bit after a startup I was at was acquired. I didn't proceed far after that 2 years due to the need to commute and/or relocate but I had a clear path into full time work without much else. Although I was granted a bit of a pass, I believe anyone can work at Google given they are 1) slightly above average and have learned every base that they run into in reasonable d…

One should also ask the question: would you want to work at Google today. This is not the Google of 2002 ... or even the Google of 2010. 2017 Google is like 1999 Microsoft.

Lots of brilliant people working on heavily resourced projects ... but also significant bureaucracy and many political animals in what was formerly a pristine engineering "garden of eden".

You can see a lot of Google projects struggling now, and many startups in the same space as Google projects doing much better than more resourced teams doing the same thing at Google.

Nobody ever got fired at Google for spending all day brilliantly arguing on Google's internal newsgroups and not doing any real work. And it shows in Google's work culture. Imagine a person doing that at a startup ... or Amazon for that matter. They would not survive very long.

If you are young, and have many years of productive/earning years ahead of you, it might make sense to turn down a Google offer to try something a bit more "bloody" and hectic for a few years before you settle down in a comfy Google job.

There are many brilliant people you can learn from at Google ... but very few work very hard. And hard, productive work is a skill to learn too.

Re: Tensorflow sucks

#86

Usually I'm on the hook for being open minded about programming languages in this forum, but I'm putting my foot down. I really hope at some point this entire universe gets liberated from Python at some point. Even R would be more palatable. Both these examples are awful , error prone, obfuscated, and beholden to Python's difficulties with large sums of data.

Can you give a sketch of how you would like these examples to look? Any language is fine; you can pretend that libraries for GPGPU, backprop, and gradient-based optimization already exist.

I tried to do so myself and couldn't come up with anything significantly better, but I've been writing Python for a long time and might just be stuck in a local minimum :)

Re: Tensorflow sucks

#87

Usually I'm on the hook for being open minded about programming languages in this forum, but I'm putting my foot down. I really hope at some point this entire universe gets liberated from Python at some point. Even R would be more palatable. Both these examples are awful , error prone, obfuscated, and beholden to Python's difficulties with large sums of data.

I bet you love Perl

Re: Tensorflow sucks

#88
post #31

A few more for your selection, - Bloated build system that is near impossible to get working - who even uses maven ?! Pytorch/Caffe are super-simple to build in comparison; with Chainer, it's even simple: all you need is pip install (even on exotic ARM devices). - The benefits of all that static analysis simply aren't there. In addition, PyTorch has a jit-compiler which one can argue lets one have their cake and eat…

I love that PyTorch kind of went all-in with anaconda. Building it is so much easier than TF! I'm a recent convert but it's dang good.

That's a serious point of frustration for me. Having an option to use anaconda, fine. Forcing it on your users, meh. I already have a working system using virtualenv and pip, why force another on me?

Re: Tensorflow sucks

#89

I'm not an AI expert and barely understand how Deep Learning works. It was always my impression that I am the target audience for Tensorflow: mainstream tech workers from the corporate environment who want to add deep learning into their toolbox, while people actually doing research on the matter seemed to prefer Scikit. Wouldn't this justify the adoption of the declarative model and the aggressive abstraction of int…

I'd say you have it kind of backwards. Tensorflow is best for research and developing novel ML solutions, scikit-learn is great for solving normal every day ML problems with normal everyday ML algorithms.

Scikit-learn however doesn't do deep learning. That being said most problems faced by mainstream tech workers don't actually have huge data sets or need deep learning and for those problems scikit-learn is great. Tensorflow only really comes into its own if you have/need some combination very huge data sets, very deep networks, a novel or non-standard network configuration and a large cluster of machines to run your learning on. If you want to apply a standard ML algorithm in the standard way on a 'small' dataset and aren't super constrained by performance then scikit-learn is almost always a good choice.

Re: Tensorflow sucks

#90

Usually I'm on the hook for being open minded about programming languages in this forum, but I'm putting my foot down. I really hope at some point this entire universe gets liberated from Python at some point. Even R would be more palatable. Both these examples are awful , error prone, obfuscated, and beholden to Python's difficulties with large sums of data.

Can you turn your comment into something productive by showing a code example front another language that handles these cases better?
Post reply on HN