Answers.Body: <p>You can think these libraries as an extension of <a href="https://en.wikipedia.org/wiki/LAPACK" rel="nofollow noreferrer">LAPACs</a>. You can use a higher level abstraction to describe your problem, and then let these libraries do the heavy lifting for you.</p>
  <blockquote>
  <p>Then, ok - we are using some modules of the Tensorflow/Keras or other module to train the dataset and we got a somewhat working machine that identifies numbers from picture - well done.. Now what? what does it actually help us doing?</p>
  </blockquote>
  <p>Well, it (the <strong>model</strong>) helps you identifying new photos of digits automatically, and as you learn more about neural networks you can use them to solve more complex problems. We use the <strong>modules</strong> (ML libraries) to do <a href="https://en.wikipedia.org/wiki/Automatic_differentiation" rel="nofollow noreferrer">automatic differentiation</a> and apply well-tested gradient descend optimizers such as <a href="http://optimization.cbe.cornell.edu/index.php?title=Adam" rel="nofollow noreferrer">Adam</a> to fit the weights.</p>
  <p>Naturally everyone could re-implement these tools and avoid 3rd party dependencies, but it is better to share and re-use the core machinery.</p>
  <blockquote>
  <p>If for example I now have a dataset of cars and want to identify the company (Suzuki, Nisan etc..) - then I need to create my own mathematical-computer vision algorithm?</p>
  </blockquote>
  <p>You could try using the same MNIST network architecture and ML code for such task, but at least you'd need to change hyperparameters such as images' resolution and the number of classes in your dataset. But since it is a more complex problem, you'll get better results with a more complex network architectures such as <a href="https://en.wikipedia.org/wiki/Convolutional_neural_network" rel="nofollow noreferrer">convolutions</a>, dropout, skip-connections, ... (I'm assuming here that the simple network would only have fully-connected <code>Dense</code> layers.)</p>
  <blockquote>
  <p>The world of machine learning/AI all about building your mathematical algorithms yourself? I am so confused..</p>
  </blockquote>
  <p>The &quot;core&quot; algorithms are implemented in these ML libraries / modules, so people can focus on more abstract tasks such as data augmentation, pre-processing, optimizing hyperparameters etc. You don't need to know how to differentiate or program GPUs. Actually even multiplying two matrices on a CPU or <a href="https://users.ncsa.illinois.edu/kindr/projects/hpca/files/NCSA_GPU_tutorial_d3.pdf" rel="nofollow noreferrer">GPU</a> in an efficient manner is non-trivial.</p>
  <p>And if you aren't trying to solve a novel problem, you can get a quick-start by adapting a proven architecture for the task. You can even load the pre-trained model and apply just fine tuning, and you'll skip many R&amp;D steps. But then you wouldn't learn nearly as much.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-09-27T11:52:19.083Z
Answers.Text: Thank you for your kind answer, I am still confused and left with some questions, what these modules really help us do - they are only helping us to compute some linear algebra problems? then where do we implement the "ok computer, this is a Nisan, this is a Suzuki, if you are wrong, learn from it"
Answers.UserDisplayName: 0Interest
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-09-28T08:16:14.593Z
Answers.Text: You should google "building neural network from scratch" and "Keras examples" (or any other library), and see how they differ even though they are solving the same problem. Doing it from scratch is a lot more nuanced and error-prone. The same applies for the LAPACK analogy: you could write the algorithms your self but it may contain bugs such as numerical instability.
Answers.UserDisplayName: NikoNyrh
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-10-03T12:02:58.700Z
Answers.Text: @JetLeg Fundamentally, the way modern AI answers questions e.g. "this is a Nisan, this is a Suzuki, if you are wrong, learn from it" *is* formulating it as a system of linear algebra with feedback loop. On high level, these packages help by assisting this process, making it easier and faster to convert the problem to linear algebra + feedback and solve it.
Answers.UserDisplayName: lpounng
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-09-27T11:42:47.640Z
Answers.LastActivityDate: 2022-09-27T11:42:47.640Z
Answers.UserDisplayName: NikoNyrh
Body: <p>This question might seem stupid at first glance, and it might be - that is because I am very new here and I've tried to think about an answer of my own, and search this question but to find no answer..</p>
  <p>The question is why do we need all these modules such as Tensorflow, Keras PyTorch etc.. ?<br />
  Let's say we have an MNIST database of a lot of handwritten numbers, we want to train our machine to identify what number is presented. Then, ok - we are using some modules of the Tensorflow/Keras or other module to train the dataset and we got a somewhat working machine that identifies numbers from picture - well done..</p>
  <p>Now what? what does it actually help us doing? if the <code>train</code> method is prebuilt then where do we need a functioning human brain in coding in these modules? everything is prebuilt... what is the algorithm behind the <code>train</code> method? I don't know, nor care, because it trains my machine on the dataset and that's all...</p>
  <p>But if I need another algorithm? and so, isn't the world of training a machine on a specific dataset will always be based on algorithms? and if you need a specific algorithm then - sit down and think about a mathematical model and build the algorithm yourself? why do we need these modules??</p>
  <p>If for example I now have a dataset of cars and want to identify the company (Suzuki, Nisan etc..) - then I need to create my own mathematical-computer vision algorithm?</p>
  <p>The world of machine learning/AI all about building your mathematical algorithms yourself? I am so confused..</p>
  <p>If this question related to the meta of this Stackexchange tell me and I will move it to there, I am new to here and not sure where to ask this..<br />
  Thank you in advance!</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-09-26T12:40:24.153Z
Comments.Text: It could just be me, but while your question initially sounds straightforward, you include lots of other questions in the body.
Comments.UserDisplayName: David Hoelzer
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-09-26T13:37:58.937Z
Comments.Text: As a quick analogy, let's say you are trying to build the most aerodynamic car possible.
   
  You'll have to experiment with various shapes and forms of the car. That would be the equivalent of the architecture of the model, that does not come out of the box from Tensorflow/Keras/... You actually have to experiment and try new things with it.
  
  But you might not want to play around with the engine of the car, as you know you already have the most suited for your purposes. That would be your prebuilt modules. :)
Comments.UserDisplayName: Adrien Nivaggioli
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-09-26T16:55:02.757Z
Comments.Text: @AdrienNivaggioli But the engine is the main core of an algorithm - you train a dataset based on an algorithm, and if those modules implement the `train` method then your algorithm is worthless/ you don't need to use these modules
Comments.UserDisplayName: 0Interest
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-09-27T09:45:08.323Z
Comments.Text: Not really, your train an architecture with a dataset, using the train method.
  The core of 99% of the of advances in Deep Learning are changes in the architecture (and sometimes the loss function), not in the train method.
Comments.UserDisplayName: Adrien Nivaggioli
Tags: <machine-learning><tensorflow><object-detection><algorithm>
Title: Why do we need Tensorflow, Keras and other ML/AI modules?
UserDisplayName: 0Interest
ThreadText: # Why do we need Tensorflow, Keras and other ML/AI modules?
  
  (Asked by: username_0 on 2022-09-26)
  
  This question might seem stupid at first glance, and it might be - that is because I am very new here and I've tried to think about an answer of my own, and search this question but to find no answer..
  
  The question is why do we need all these modules such as Tensorflow, Keras PyTorch etc.. ?  
  Let's say we have an MNIST database of a lot of handwritten numbers, we want to train our machine to identify what number is presented. Then, ok - we are using some modules of the Tensorflow/Keras or other module to train the dataset and we got a somewhat working machine that identifies numbers from picture - well done..
  
  Now what? what does it actually help us doing? if the `train` method is prebuilt then where do we need a functioning human brain in coding in these modules? everything is prebuilt... what is the algorithm behind the `train` method? I don't know, nor care, because it trains my machine on the dataset and that's all...
  
  But if I need another algorithm? and so, isn't the world of training a machine on a specific dataset will always be based on algorithms? and if you need a specific algorithm then - sit down and think about a mathematical model and build the algorithm yourself? why do we need these modules??
  
  If for example I now have a dataset of cars and want to identify the company (Suzuki, Nisan etc..) - then I need to create my own mathematical-computer vision algorithm?
  
  The world of machine learning/AI all about building your mathematical algorithms yourself? I am so confused..
  
  If this question related to the meta of this Stackexchange tell me and I will move it to there, I am new to here and not sure where to ask this..  
  Thank you in advance!
  
  **Tags:** machine-learning, tensorflow, object-detection, algorithm
  
  > **Comments:**
  > **username_1**: It could just be me, but while your question initially sounds straightforward, you include lots of other questions in the body.  
  > **username_2**: As a quick analogy, let's say you are trying to build the most aerodynamic car possible.   You'll have to experiment with various shapes and forms of the car. That would be the equivalent of the architecture of the model, that does not come out of the box from Tensorflow/Keras/... You actually have to experiment and try new things with it.  But you might not want to play around with the engine of the car, as you know you already have the most suited for your purposes. That would be your prebuilt modules. :)  
  > **username_0**: @username_2 But the engine is the main core of an algorithm - you train a dataset based on an algorithm, and if those modules implement the `train` method then your algorithm is worthless/ you don't need to use these modules  
  > **username_2**: Not really, your train an architecture with a dataset, using the train method. The core of 99% of the of advances in Deep Learning are changes in the architecture (and sometimes the loss function), not in the train method.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_3 on 2022-09-27. Score: 1 | Accepted answer
  
  You can think these libraries as an extension of [LAPACs](https://en.wikipedia.org/wiki/LAPACK). You can use a higher level abstraction to describe your problem, and then let these libraries do the heavy lifting for you.
  
  > Then, ok - we are using some modules of the Tensorflow/Keras or other module to train the dataset and we got a somewhat working machine that identifies numbers from picture - well done.. Now what? what does it actually help us doing?
  
  Well, it (the **model**) helps you identifying new photos of digits automatically, and as you learn more about neural networks you can use them to solve more complex problems. We use the **modules** (ML libraries) to do [automatic differentiation](https://en.wikipedia.org/wiki/Automatic_differentiation) and apply well-tested gradient descend optimizers such as [Adam](http://optimization.cbe.cornell.edu/index.php?title=Adam) to fit the weights.
  
  Naturally everyone could re-implement these tools and avoid 3rd party dependencies, but it is better to share and re-use the core machinery.
  
  > If for example I now have a dataset of cars and want to identify the company (Suzuki, Nisan etc..) - then I need to create my own mathematical-computer vision algorithm?
  
  You could try using the same MNIST network architecture and ML code for such task, but at least you'd need to change hyperparameters such as images' resolution and the number of classes in your dataset. But since it is a more complex problem, you'll get better results with a more complex network architectures such as [convolutions](https://en.wikipedia.org/wiki/Convolutional_neural_network), dropout, skip-connections, ... (I'm assuming here that the simple network would only have fully-connected `Dense` layers.)
  
  > The world of machine learning/AI all about building your mathematical algorithms yourself? I am so confused..
  
  The "core" algorithms are implemented in these ML libraries / modules, so people can focus on more abstract tasks such as data augmentation, pre-processing, optimizing hyperparameters etc. You don't need to know how to differentiate or program GPUs. Actually even multiplying two matrices on a CPU or [GPU](https://users.ncsa.illinois.edu/kindr/projects/hpca/files/NCSA_GPU_tutorial_d3.pdf) in an efficient manner is non-trivial.
  
  And if you aren't trying to solve a novel problem, you can get a quick-start by adapting a proven architecture for the task. You can even load the pre-trained model and apply just fine tuning, and you'll skip many R&D steps. But then you wouldn't learn nearly as much.
  
  > **Comments:**
  > **username_0**: Thank you for your kind answer, I am still confused and left with some questions, what these modules really help us do - they are only helping us to compute some linear algebra problems? then where do we implement the "ok computer, this is a Nisan, this is a Suzuki, if you are wrong, learn from it"  
  > **username_3**: You should google "building neural network from scratch" and "Keras examples" (or any other library), and see how they differ even though they are solving the same problem. Doing it from scratch is a lot more nuanced and error-prone. The same applies for the LAPACK analogy: you could write the algorithms your self but it may contain bugs such as numerical instability.  
  > **username_4**: @JetLeg Fundamentally, the way modern AI answers questions e.g. "this is a Nisan, this is a Suzuki, if you are wrong, learn from it" *is* formulating it as a system of linear algebra with feedback loop. On high level, these packages help by assisting this process, making it easier and faster to convert the problem to linear algebra + feedback and solve it.  
  
  ---
  
  