update
This commit is contained in:
@@ -358,6 +358,7 @@ $$
|
||||
1 & 1 \end{bmatrix},
|
||||
$$
|
||||
|
||||
<p>
|
||||
while the vector of outputs is \( \boldsymbol{y}^T=[0,1,1,0] \) for the XOR gate, \( \boldsymbol{y}^T=[0,0,0,1] \) for the AND gate and \( \boldsymbol{y}^T=[0,1,1,1] \) for the OR gate.
|
||||
|
||||
<p>
|
||||
|
||||
@@ -1543,6 +1543,7 @@ $$
|
||||
$$
|
||||
<p> <br>
|
||||
|
||||
<p>
|
||||
while the vector of outputs is \( \boldsymbol{y}^T=[0,1,1,0] \) for the XOR gate, \( \boldsymbol{y}^T=[0,0,0,1] \) for the AND gate and \( \boldsymbol{y}^T=[0,1,1,1] \) for the OR gate.
|
||||
</section>
|
||||
|
||||
|
||||
@@ -1552,6 +1552,7 @@ $$
|
||||
1 & 1 \end{bmatrix},
|
||||
$$
|
||||
|
||||
<p>
|
||||
while the vector of outputs is \( \boldsymbol{y}^T=[0,1,1,0] \) for the XOR gate, \( \boldsymbol{y}^T=[0,0,0,1] \) for the AND gate and \( \boldsymbol{y}^T=[0,1,1,1] \) for the OR gate.
|
||||
|
||||
<p>
|
||||
|
||||
@@ -1557,6 +1557,7 @@ $$
|
||||
1 & 1 \end{bmatrix},
|
||||
$$
|
||||
|
||||
<p>
|
||||
while the vector of outputs is \( \boldsymbol{y}^T=[0,1,1,0] \) for the XOR gate, \( \boldsymbol{y}^T=[0,0,0,1] \) for the AND gate and \( \boldsymbol{y}^T=[0,1,1,1] \) for the OR gate.
|
||||
|
||||
<p>
|
||||
|
||||
Binary file not shown.
@@ -1555,7 +1555,6 @@
|
||||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"\n",
|
||||
"# import necessary packages\n",
|
||||
"import numpy as np\n",
|
||||
"import matplotlib.pyplot as plt\n",
|
||||
|
||||
@@ -1120,6 +1120,7 @@ Our design matrix is defined by the input values $x_1$ and $x_2$. Since we have
|
||||
1 & 0 \\
|
||||
1 & 1 \end{bmatrix},
|
||||
!et
|
||||
|
||||
while the vector of outputs is $\bm{y}^T=[0,1,1,0]$ for the XOR gate, $\bm{y}^T=[0,0,0,1]$ for the AND gate and $\bm{y}^T=[0,1,1,1]$ for the OR gate.
|
||||
|
||||
!split
|
||||
@@ -1195,13 +1196,13 @@ predictions = predict(X)
|
||||
print(predictions)
|
||||
|
||||
!ec
|
||||
|
||||
Not an impressive result, but this was our first forward pass with randomly assigned weights. Let us now add the full network with the back-propagation algorithm discussed above.
|
||||
|
||||
!split
|
||||
===== The Code using Scikit-Learn =====
|
||||
|
||||
!bc pycod
|
||||
|
||||
# import necessary packages
|
||||
import numpy as np
|
||||
import matplotlib.pyplot as plt
|
||||
|
||||
Reference in New Issue
Block a user