computer_science:machine_learning:coursera:introduction_tensorflow_artificial_intelligence_deep

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:coursera:introduction_tensorflow_artificial_intelligence_deep [2020/08/10 12:46] carlossousacomputer_science:machine_learning:coursera:introduction_tensorflow_artificial_intelligence_deep [2023/12/01 12:07] (current) – external edit 127.0.0.1
Line 14: Line 14:
 # The Complete Code # The Complete Code
 import tensorflow as tf import tensorflow as tf
- 
 import numpy as np import numpy as np
- 
 from tensorflow import keras from tensorflow import keras
  
 model = keras.Sequential([keras.layers.Dense(units=1, input_shape=[1])]) model = keras.Sequential([keras.layers.Dense(units=1, input_shape=[1])])
- 
 model.compile(optimizer='sgd', loss='mean_squared_error') model.compile(optimizer='sgd', loss='mean_squared_error')
  
 xs = np.array([-1.0, 0.0, 1.0, 2.0, 3.0, 4.0], dtype=float) xs = np.array([-1.0, 0.0, 1.0, 2.0, 3.0, 4.0], dtype=float)
- 
 ys = np.array([-3.0, -1.0, 1.0, 3.0, 5.0, 7.0], dtype=float) ys = np.array([-3.0, -1.0, 1.0, 3.0, 5.0, 7.0], dtype=float)
  
Line 30: Line 26:
  
 print(model.predict([17.0])) print(model.predict([17.0]))
- 
 print(model.predict([22.0])) print(model.predict([22.0]))
- 
 print(model.predict([35.0])) print(model.predict([35.0]))
 +
  
 </code> </code>
Line 144: Line 139:
 As you work with neural networks, you'll see this pattern recurring. You will almost always deal with probabilities, not certainties, and will do a little bit of coding to figure out what the result is based on the probabilities, particularly when it comes to classification. As you work with neural networks, you'll see this pattern recurring. You will almost always deal with probabilities, not certainties, and will do a little bit of coding to figure out what the result is based on the probabilities, particularly when it comes to classification.
  
 +==== Week 1 Quiz ====
 +
 +**The diagram for traditional programming had Rules and Data In, but what came out?** Answers
 +
 +**The diagram for Machine Learning had Answers and Data In, but what came out?** Rules
 +
 +**When I tell a computer what the data represents (i.e. this data is for walking, this data is for running), what is that process called? **Labelling the Data
 +
 +**What is a Dense? **A layer of connected neurons
 +
 +**What does a Loss function do?** Measures how good the urrent 'guess' is
 +
 +**What does the optimizer do?** Generates a new and improved guess
 +
 +**What is Convergence?** The process of getting very close to the correct answer
 +
 +**What does model.fit do?** It trains the neural network to fit one set of values to another
 ===== External References: ===== ===== External References: =====
  
  • computer_science/machine_learning/coursera/introduction_tensorflow_artificial_intelligence_deep.1597063567.txt.gz
  • Last modified: 2023/12/01 12:07
  • (external edit)