r/deeplearning • • Oct 30 '26

Why Torch dominates Tensorflow?

I have been used Tensorflow since its version 1.X (1.8 was my first tensorflow as i remember).

So i started from graph based building modeling, staying as much away from 'python' as possible.

Keras keeps its philosophy, even under different interfaces.

At that time, torch was more python-oriented, not optimized for graph building, so i never considered using it; running epochs on python loop seems crazy in negative sense

Recently i had to use torch, since huggingface ecosystem is mostly built on torch. I have no idea why torch have been taken over tensorflow.

I know tensorflow now is not even a competitor to torch. Please give your opinions :)

113 Upvotes

65 comments sorted by

View all comments

1

u/Tvicker Oct 30 '26 edited Oct 30 '26

Because tensorflow/keras library API just sucked and it broke between versions all the time. This is literally the only reason. I had to copy templates from Stack Overflow to do basic things while I learnt Torch in 4 hours. I don't know if they made it easier or more straightforward but the train has already gone. Even if we needed to launch frozen graphs on a calculator, we developed models in Pytorch and then ported them to Tensorflow.

1

u/johnnymo1 Oct 30 '26

The API thing was crazy. I started around the time of TF2 and I didn’t hate it, but stuff would get deprecated all the time. I remember one time going to the docs for some function and being told it was deprecated, with a link to what I should update to. And when I followed that link, that was deprecated too. The API was awful.