Answers.Body: <p>PyTorch dominates research due to its Pythonic flexible approach with dynamical computational graph support which is crucial for prototyping and quick development, while TensorFlow shines in production with its comprehensive ecosystem, scalability, both static and dynamic computational graph support, and multiple language support (Python, C++, Java, GO, C#, JS). Both as open-source frameworks, their adaptability, strong community, big corporation backing, support for GPU/TPU/distributed cluster, and powerful features make them the top choices for ML practitioners and researchers.</p>
  <p>Other frameworks such as MXNet, <a href="https://en.wikipedia.org/wiki/Theano_(software)" rel="nofollow noreferrer">Theano</a>, and Caffe either face competition pressure from industry, lack community support, modern features, or the ease of use of PyTorch and TensorFlow.</p>
  <blockquote>
  <p>Theano is an open source project primarily developed by the Montreal Institute for Learning Algorithms (MILA)... On 28 September 2017, Pascal Lamblin posted a message from Yoshua Bengio, Head of MILA: major development would cease after the 1.0 release due to competing offerings by strong industrial players.</p>
  </blockquote>
  <p>A newer narrow-scoped framework called <a href="https://en.wikipedia.org/wiki/Google_JAX" rel="nofollow noreferrer">Google JAX</a> is gaining traction for research but lacks the production tools and comprehensive features of TensorFlow and PyTorch.</p>
  <blockquote>
  <p>Google JAX is a machine learning framework for transforming numerical functions. It is described as bringing together a modified version of autograd (automatic obtaining of the gradient function through differentiation of a function) and TensorFlow's XLA (Accelerated Linear Algebra). It is designed to follow the structure and workflow of NumPy as closely as possible and works with various existing frameworks such as TensorFlow and PyTorch.</p>
  </blockquote>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-12-11T03:04:58.667Z
Answers.LastActivityDate: 2024-12-11T03:04:58.667Z
Answers.UserDisplayName: cinch
Answers.Body: <p>I didn't check and only an extensive survey can provide good evidence for your claim, but, yes, it's most likely true that PyTorch and TensorFlow are among the most widely used libraries. There can be many reasons why they became successful, but one clear reason is that they are supported by big companies, Meta and Google.</p>
  <p>However, PyTorch and TensorFlow are mostly deep learning libraries. There are other more general machine learning libraries that are also used a lot, like scikit-learn, pandas, or numpy, which is not strictly a machine learning library, but can be used for anything that involves matrix operations, etc. If you look at <a href="https://survey.stackoverflow.co/2024/technology#1-other-frameworks-and-libraries" rel="nofollow noreferrer">the 2024 Stack Overflow Developer Survey</a>, you will see that numpy, pandas and scikit-learn are among the most widely used libraries and even come before PyTorch and TensorFlow, but we must also consider many people that answer to these surveys are software developers/engineers and not machine learning researchers, practitioners, etc.</p>
  <p>In other AI areas, like evolutionary computation, other libraries are used more, like DEAP.</p>
  <p>One thing we can say is that these libraries usually have a Python interface and are usually written in C or C++ under the hood to get performance.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-12-11T17:50:27.280Z
Answers.LastActivityDate: 2024-12-11T17:50:27.280Z
Answers.UserDisplayName: nbro
Body: <p>Even through there are several others, what's special about these two that make them so popular?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-12-11T11:08:17.450Z
Comments.Text: Questions about specific software are off-topic here, although we also have questions like "Why is Python popular in AI?", so we could also allow this question. Please, familiarise yourself with our on-topic page: https://ai.stackexchange.com/help/on-topic. But can you please provide more context? Have you ever used these frameworks, for example? What kind of answer are you looking for? We could simply say "Because they are the best". I don't think that type of answer would be extremely useful.
Comments.UserDisplayName: nbro
Tags: <machine-learning><tensorflow><pytorch><ai-field><ai-development>
Title: Why are PyTorch and TensorFlow the most widely used frameworks?
UserDisplayName: Hephaestus
ThreadText: # Why are PyTorch and TensorFlow the most widely used frameworks?
  
  (Asked by: username_0 on 2024-12-11)
  
  Even through there are several others, what's special about these two that make them so popular?
  
  **Tags:** machine-learning, tensorflow, pytorch, ai-field, ai-development
  
  > **Comments:**
  > **username_1**: Questions about specific software are off-topic here, although we also have questions like "Why is Python popular in AI?", so we could also allow this question. Please, familiarise yourself with our on-topic page: https://ai.stackexchange.com/help/on-topic. But can you please provide more context? Have you ever used these frameworks, for example? What kind of answer are you looking for? We could simply say "Because they are the best". I don't think that type of answer would be extremely useful.  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2024-12-11. Score: 2 | Accepted answer
  
  PyTorch dominates research due to its Pythonic flexible approach with dynamical computational graph support which is crucial for prototyping and quick development, while TensorFlow shines in production with its comprehensive ecosystem, scalability, both static and dynamic computational graph support, and multiple language support (Python, C++, Java, GO, C#, JS). Both as open-source frameworks, their adaptability, strong community, big corporation backing, support for GPU/TPU/distributed cluster, and powerful features make them the top choices for ML practitioners and researchers.
  
  Other frameworks such as MXNet, [Theano](https://en.wikipedia.org/wiki/Theano_(software)), and Caffe either face competition pressure from industry, lack community support, modern features, or the ease of use of PyTorch and TensorFlow.
  
  > Theano is an open source project primarily developed by the Montreal Institute for Learning Algorithms (MILA)... On 28 September 2017, Pascal Lamblin posted a message from Yoshua Bengio, Head of MILA: major development would cease after the 1.0 release due to competing offerings by strong industrial players.
  
  A newer narrow-scoped framework called [Google JAX](https://en.wikipedia.org/wiki/Google_JAX) is gaining traction for research but lacks the production tools and comprehensive features of TensorFlow and PyTorch.
  
  > Google JAX is a machine learning framework for transforming numerical functions. It is described as bringing together a modified version of autograd (automatic obtaining of the gradient function through differentiation of a function) and TensorFlow's XLA (Accelerated Linear Algebra). It is designed to follow the structure and workflow of NumPy as closely as possible and works with various existing frameworks such as TensorFlow and PyTorch.
  
  
  ---
  
  ### Answer by username_1 on 2024-12-11. Score: 1
  
  I didn't check and only an extensive survey can provide good evidence for your claim, but, yes, it's most likely true that PyTorch and TensorFlow are among the most widely used libraries. There can be many reasons why they became successful, but one clear reason is that they are supported by big companies, Meta and Google.
  
  However, PyTorch and TensorFlow are mostly deep learning libraries. There are other more general machine learning libraries that are also used a lot, like scikit-learn, pandas, or numpy, which is not strictly a machine learning library, but can be used for anything that involves matrix operations, etc. If you look at [the 2024 Stack Overflow Developer Survey](https://survey.stackoverflow.co/2024/technology#1-other-frameworks-and-libraries), you will see that numpy, pandas and scikit-learn are among the most widely used libraries and even come before PyTorch and TensorFlow, but we must also consider many people that answer to these surveys are software developers/engineers and not machine learning researchers, practitioners, etc.
  
  In other AI areas, like evolutionary computation, other libraries are used more, like DEAP.
  
  One thing we can say is that these libraries usually have a Python interface and are usually written in C or C++ under the hood to get performance.
  
  
  ---
  
  