r/learnmachinelearning • u/tommyeow_ • 26d ago
Pytorch or Tensorflow?
I've had a few people tell me tensorflow is not used as much nowadays as pytorch, also, pytorch is more pythonic, and just more industry-relevant than tf, is it really so? The tutorial course im following is using tf more since it is appropriate for beginners (as said in the course). I'd like to know the differences.
56
Upvotes
View all comments
1
u/Ghiren 25d ago
TensorFlow was the first library to make it big. TF 1.x was awkward to use, but it was the only option for deep learning for awhile so it had a big user base for professional projects. There were two big responses to how un-pythonic it was.
Keras was made as a higher-level library on top of TensorFlow and it solves a LOT of problems that people had. I believe that the creator was hired by Google and the interface was added into TensorFlow starting with version 2.0. The ease of use made a huge difference and most of the TF code that I've seen since then was actually using tf.keras to build and train the models.
PyTorch was made by Meta, and it did all of the things that TensorFlow did, using more python-centric workflows. It caught on big with research projects and has been spreading into the professional world. I've found it easier to use than base TF, but not as beginner friendly as Keras.