Live data from Hacker News

Tensorflow sucks

nicodjimenez.github.io

11–20 of 133 posts

Re: Tensorflow sucks

#12
post #6

> Pytorch’s interface is objectively much better than Tensorflow’s Ummm. No. 'Objectively' is utter nonsense. For an objective view we would need to define "better" first and measure both interfaces performance. I think it is preference. I prefer the Tensorflow interface and don't mind it's declarative style. However, if one wants to criticize something one could start with the static nature of Tensorflow (which you…

In my experience (computer vision, deep learning) PyTorch is substantially faster as well, especially in data augmentation where it’s not just a thin layer over cudnn. That said, you’re right. There’s no way I’d deploy it to production.

Why wouldn't you deploy it in production - on server side at least?

Re: Tensorflow sucks

#13
post #6

> Pytorch’s interface is objectively much better than Tensorflow’s Ummm. No. 'Objectively' is utter nonsense. For an objective view we would need to define "better" first and measure both interfaces performance. I think it is preference. I prefer the Tensorflow interface and don't mind it's declarative style. However, if one wants to criticize something one could start with the static nature of Tensorflow (which you…

In my experience (computer vision, deep learning) PyTorch is substantially faster as well, especially in data augmentation where it’s not just a thin layer over cudnn. That said, you’re right. There’s no way I’d deploy it to production.

Nonsense, Pytorch is great in production. I use it for Mathpix (mathpix.com) which processes 20 million images per month.

Re: Tensorflow sucks

#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 do the same things as Tensorboard, but for whatever framework you like.

All in all, expression graphs like these used in TF and Theano are great for symbolic differentiation of a loss function and further expression optimization (e.g. simplification, operation fusion, etc.). But TF goes further and makes everything a node in a graph. Even things that are not algebraic expressions such as variable initialization or objective optimization.

Re: Tensorflow sucks

#15

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 believe the issue is that the code only actually runs when you calls session.run this makes debugging a nightmare. Sure TF can improve message, but it's not there yet.

IMO, TF2 should make dynamic execution first class and switch easily to static graph when you need to deploy stuff.

Re: Tensorflow sucks

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

Re: Tensorflow sucks

#18
post #6

Earlier quoted context omitted.

In my experience (computer vision, deep learning) PyTorch is substantially faster as well, especially in data augmentation where it’s not just a thin layer over cudnn. That said, you’re right. There’s no way I’d deploy it to production.

Why wouldn't you deploy it in production - on server side at least?

Because TF lets you run _just_ the model, with no Python stuff at all. For us there is no “server side”, our stuff is deployed on prem. The fewer variables there are the easier our lives are going to be.

Additionally, PyTorch download page warns you point blank that it’s an early version of the software and that you should “expect some adventures”. Adventures are fine for research, but inadvisable in production IMO.

Re: Tensorflow sucks

#19
post #6

Earlier quoted context omitted.

In my experience (computer vision, deep learning) PyTorch is substantially faster as well, especially in data augmentation where it’s not just a thin layer over cudnn. That said, you’re right. There’s no way I’d deploy it to production.

Nonsense, Pytorch is great in production. I use it for Mathpix (mathpix.com) which processes 20 million images per month.

Don't take this the wrong way, but 20M images per month is only about 20 qps or so (20M / 3600 / 730 => 7.6 qps, but that's unrealistically even). That's pretty manageable even on a single box, depending on the network and the size of the box. When people say they're concerned about a system in production, they often mean when needing to roll it out to many machines due to higher scalability requirements.

Disclosure: I work at Google, but not TensorFlow.

Re: Tensorflow sucks

#20

Don't flame me but how does tensorflow compare with Azure machine learning platform. For me it provides a great platform for practitioners

I think these are not comparable. Tensorflow is a software library, Azure is a compute environment which allows one to run, among many other libraries, tensorflow implementations of ML models.
Post reply on HN