computer_science:machine_learning:udacity:intro_to_tensorflow_for_deep_learning

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
computer_science:machine_learning:udacity:intro_to_tensorflow_for_deep_learning [2020/08/11 14:57] carlossousacomputer_science:machine_learning:udacity:intro_to_tensorflow_for_deep_learning [2024/08/16 12:54] (current) – removed carlossousa
Line 1: Line 1:
-====== Intro to TensorFlow for Deep Learning by Udacity ====== 
- 
-===== Introduction ===== 
- 
-When studying Machine Learning you will come across many different terms such as artificial intelligence, machine learning, neural network, and deep learning. But what do these terms actually mean and how do they relate to each other? 
- 
-Below we give a brief description of these terms: 
- 
-  * **Artificial Intelligence:**  A field of computer science that aims to make computers achieve human-style intelligence. There are many approaches to reaching this goal, including machine learning and deep learning. 
-  * **Machine Learning:**  A set of related techniques in which computers are trained to perform a particular task rather than by explicitly programming them. 
-  * **Neural Network:**  A construct in Machine Learning inspired by the network of neurons (nerve cells) in the biological brain. Neural networks are a fundamental part of deep learning, and will be covered in this course. 
-  * **Deep Learning:**  A subfield of machine learning that uses multi-layered neural networks. Often, “machine learning” and “deep learning” are used interchangeably. {{:computer_science:machine_learning:ai-diagram.png?nolink&600x335}} 
-{{:computer_science:machine_learning:udacity:ai-diagram.png?nolink&600x335}} 
- 
-Machine learning and deep learning also have many subfields, branches, and special techniques. A notable example of this diversity is the separation of **Supervised Learning**  and **Unsupervised Learning**. 
- 
-To over simplify — in supervised learning you know what you want to teach the computer, while unsupervised learning is about letting the computer figure out what can be learned. Supervised learning is the most common type of machine learning, and will be the focus of this course. 
- 
-===== What is Machine Learning ===== 
- 
-There are many types of neural network architectures. However, no matter what architecture you choose, the math it contains (what calculations are being performed, and in what order) is not modified during training. Instead, it is the internal variables (“weights” and “biases”) which are updated during training. 
- 
-For example, in the Celsius to Fahrenheit conversion problem, the model starts by multiplying the input by some number (the weight) and adding another number (the bias). Training the model involves finding the right values for these variables, not changing from multiplication and addition to some other operation. 
- 
-===== The Basics: Training your first model ===== 
- 
-To keep this page from being massive, all codes / projects will be on their own page. Therefore, visit [[:computer_science:machine_learning:udacity:intro_to_tensorflow_for_deep_learning:basics_training_your_first_model|Intro to TensorFlow for Machine Learning by Udacity - Training your first model]]. 
- 
-===== The Training Process ===== 
- 
-The training process (happening in ''model.fit(…)'') is really about tuning the internal variables of the networks to the best possible values, so that they can map the input to the output. This is achieved through an optimization process called Gradient Descent, which uses Numeric Analysis to find the best possible values to the internal variables of the model. 
- 
-To do machine learning, you don't really need to understand these details. But for the curious: gradient descent iteratively adjusts parameters, nudging them in the correct direction a bit at a time until they reach the best values. In this case “best values” means that nudging them any more would make the model perform worse. The function that measures how good or bad the model is during each iteration is called the “loss function”, and the goal of each nudge is to “minimize the loss function.” 
- 
-The training process starts with a forward pass, where the input data is fed to the neural network. Then the model applies its internal math on the input and internal variables to predict an answer. 
- 
-In our example, the input was the degrees in Celsius, and the model predicted the corresponding degrees in Fahrenheit.{{:computer_science:machine_learning:udacity:tensorflow-l2f21.png?nolink&801x450}} 
- 
-{{:computer_science:machine_learning:udacity:tensorflow-l2f2.png?nolink&801x450}} 
- 
-Once a value is predicted, the difference between that predicted value and the correct value is calculated. This difference is called the loss, and it's a measure of how well the model performed the mapping task. The value of the loss is calculated using a loss function, which we specified with the loss parameter when calling ''model.compile()''. 
- 
-After the loss is calculated, the internal variables (weights and biases) of all the layers of the neural network are adjusted, so as to minimize this loss — that is, to make the output value closer to the correct value. 
- 
-{{:computer_science:machine_learning:udacity:tensorflow-l2f3.png?nolink&800x450}} 
- 
-This optimization process is called Gradient Descent. The specific algorithm used to calculate the new value of each internal variable is specified by the optimizer parameter when calling ''model.compile(…)''. In this example we used the ''Adam''  optimizer. 
- 
-It is not required for this course, but if you're interested in learning more details about how the training process works, you can look at the [[https://developers.google.com/machine-learning/crash-course/reducing-loss/video-lecture|lesson on reducing loss in Google’s machine learning crash course]]. 
- 
-By now you should know what the following terms are: 
- 
-  * **Feature:**  The input(s) to our model 
-  * **Examples:**  An input/output pair used for training 
-  * **Labels:**  The output of the model 
-  * **Layer:**  A collection of nodes connected together within a neural network. 
-  * **Model:**  The representation of your neural network 
-  * **Dense and Fully Connected (FC):**  Each node in one layer is connected to each node in the previous layer. 
-  * **Weights and biases:**  The internal variables of model 
-  * **Loss:**  The discrepancy between the desired output and the actual output 
-  * **MSE:**  Mean squared error, a type of loss function that counts a small number of large discrepancies as worse than a large number of small ones. 
-  * **Gradient Descent:**  An algorithm that changes the internal variables a bit at a time to gradually reduce the loss function. 
-  * **Optimizer:**  A specific implementation of the gradient descent algorithm. 
-  * **Learning rate:**  The “step size” for loss improvement during gradient descent. 
-  * **Batch:**  The set of examples used during training of the neural network 
-  * **Epoch:**  A full pass over the entire training dataset 
-  * **Forward pass:**  The computation of output values from input 
-  * **Backward pass (backpropagation):**  The calculation of internal variable adjustments according to the optimizer algorithm, starting from the output layer and working back through each layer to the input. 
-====== References ====== 
- 
-[[https://classroom.udacity.com/courses/ud187|https://classroom.udacity.com/courses/ud187]] 
- 
  
  • computer_science/machine_learning/udacity/intro_to_tensorflow_for_deep_learning.1597150646.txt.gz
  • Last modified: 2023/12/01 13:07
  • (external edit)