Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
computer_science:machine_learning:coursera:introduction_tensorflow_artificial_intelligence_deep [2020/08/10 12:40] – carlossousa | computer_science:machine_learning:coursera:introduction_tensorflow_artificial_intelligence_deep [2023/12/01 12:07] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 12: | Line 12: | ||
<code python> | <code python> | ||
- | # One Neuron Neural Network | + | # The Complete Code |
- | # Dense = Define a Layer of connected Neurons | + | import tensorflow as tf |
- | # Only 1 Layer, Only 1 Unit, so a Single (1) Neuron | + | import numpy as np |
+ | from tensorflow import keras | ||
model = keras.Sequential([keras.layers.Dense(units=1, | model = keras.Sequential([keras.layers.Dense(units=1, | ||
Line 23: | Line 24: | ||
model.fit(xs, | model.fit(xs, | ||
+ | |||
+ | print(model.predict([17.0])) | ||
+ | print(model.predict([22.0])) | ||
+ | print(model.predict([35.0])) | ||
Line 134: | Line 139: | ||
As you work with neural networks, you'll see this pattern recurring. You will almost always deal with probabilities, | As you work with neural networks, you'll see this pattern recurring. You will almost always deal with probabilities, | ||
+ | ==== 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 ' | ||
+ | |||
+ | **What does the optimizer do?** Generates a new and improved guess | ||
+ | |||
+ | **What is Convergence? | ||
+ | |||
+ | **What does model.fit do?** It trains the neural network to fit one set of values to another | ||
===== External References: ===== | ===== External References: ===== | ||