Answers.Body: <p><a href="https://github.com/google/flax" rel="nofollow noreferrer">Flax</a> is a high-level library built on top of <a href="https://github.com/google/jax" rel="nofollow noreferrer">Jax</a>, which is a recent numerical framework that allows the building of differentiable models. Compared to PyTorch, Jax (and so Flax) follows the principles of <em>functional programming</em>: immutable objects, functions are first-class, and stateless computation, to name a few. Pytorch, instead, follows an object-oriented programming paradigm where you represent your models as objects rather than the application of a function.</p>
  <p>Basically, Jax and Pytorch implement the same thing with two different philosophies. Moreover, Jax is gathering attention thanks to its improved reproducibility since it is designed around stateless functions.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-02-03T16:22:58.333Z
Answers.Text: Hi got a doubt ..Is FLAX is optimised better than Pytorch or not? I am trying to convert a FLAX model to pytorch which has used nearly more than 10 Multi Layer Preceptrons for training the model.
Answers.UserDisplayName: akhil
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-02-03T17:37:41.397Z
Answers.Text: @sripathiakhil I haven't done any benchmark, but I'll expect similar performance.
Answers.UserDisplayName: Luca Anzalone
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-01-20T15:29:37.727Z
Answers.LastActivityDate: 2024-05-27T12:43:17.720Z
Answers.LastEditDate: 2024-05-27T12:43:17.720Z
Answers.UserDisplayName: Luca Anzalone
Body: <p>I am going through a code written in FLAX instead of pytorch .Can someone please explain what is the difference between these two deep learning frameworks?</p>
  
Tags: <neural-networks><deep-learning><pytorch>
Title: Difference between FLAX and pytorch
UserDisplayName: akhil
ThreadText: # Difference between FLAX and pytorch
  
  (Asked by: username_0 on 2024-01-20)
  
  I am going through a code written in FLAX instead of pytorch .Can someone please explain what is the difference between these two deep learning frameworks?
  
  **Tags:** neural-networks, deep-learning, pytorch
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2024-01-20. Score: 1 | Accepted answer
  
  [Flax](https://github.com/google/flax) is a high-level library built on top of [Jax](https://github.com/google/jax), which is a recent numerical framework that allows the building of differentiable models. Compared to PyTorch, Jax (and so Flax) follows the principles of *functional programming*: immutable objects, functions are first-class, and stateless computation, to name a few. Pytorch, instead, follows an object-oriented programming paradigm where you represent your models as objects rather than the application of a function.
  
  Basically, Jax and Pytorch implement the same thing with two different philosophies. Moreover, Jax is gathering attention thanks to its improved reproducibility since it is designed around stateless functions.
  
  > **Comments:**
  > **username_0**: Hi got a doubt ..Is FLAX is optimised better than Pytorch or not? I am trying to convert a FLAX model to pytorch which has used nearly more than 10 Multi Layer Preceptrons for training the model.  
  > **username_1**: @sripathiakhil I haven't done any benchmark, but I'll expect similar performance.  
  
  ---
  
  