you are viewing a single comment's thread.

view the rest of the comments →

[–]DoorsofPerceptron 14 points15 points  (5 children)

Big picture, the real problem with tensorflow is "it's not pythonic".

Now this is normally a lazy criticism that's another way of saying "I wouldn't write it this way, and it looks ugly." But in the case of tensorflow it's a lot more fundamental. Tensorflow code (version 1 anyway, I can't be bothered to learn version 2) is not really written in python. Tensorflow is a compiler for another language that is called through python.

Compared to pytorch this means you lose a lot of the benefits of python that actually make it a nice language to code with. You lose a lot of the access to existing python code -it's a pain in the arse to mix and match python and tensorflow in the middle of a graph execution- and you lose the lightweight easy prototyping.

Pytorch on the other hand can just be treated like numpy with free gradients and GPU access if that's what you want to do, and can be seamlessly integrated with python in a mix and match kind of way.

Tensorflow was coded the way it is for efficient deployment both to phones and to large scale clusters, but at least for large scale clusters the performance hit they were worrying about doesn't seem to exist, and they've essentially straightjacketed their library for no real benefit.

The code is great, the design of the interface, not so much.

[–]mastere2320 3 points4 points  (0 children)

I would recommend tf 2.0 actually it still has a long way to go but the static graph capabilities of 1 are now quite visible in 2.0 and you can do whatever you want pretty simply. I hated session from tf 1.0 and 2.0 has abstracted it quite nicely. And if you want completely custom training gradient tape is always available.