This commit is contained in:
Morten Hjorth-Jensen
2023-10-25 09:38:02 +02:00
parent b45fe1b743
commit ba5f9ea365
9 changed files with 602 additions and 462 deletions
+4 -3
View File
@@ -134,12 +134,13 @@ Assume also that the bias of the output layer is zero and that the weights of th
!et
and multiplying with $\bm{a}_h$ gives the output
!bt
\bm{a}_o=\bm{w}_h^T\begin{bmatrix} 0 & 0 \\
\bm{a}_o=\begin{bmatrix} 0 & 0 \\
1 & 0 \\
1 & 0 \\
2 & 1 \end{bmatrix}=\begin{bmatrix} 0 \\ 1 \\ 1 \\0\end{bmatrix},
2 & 1 \end{bmatrix}\begin{bmatrix} 1 \\
-2\end{bmatrix}=\begin{bmatrix} 0 \\ 1 \\ 1 \\0\end{bmatrix},
!et
the wanted result.
the wanted result. Pay attention to the dimensionalities as well.
!split
+5 -5
View File
@@ -61,6 +61,7 @@ cost function.
Their inputs and outputs can be
summarized using the following tables, first for the OR gate with
inputs $x_1$ and $x_2$ and outputs $y$:
@@ -173,12 +174,13 @@ Assume also that the bias of the output layer is zero and that the weights of th
!et
and multiplying with $\bm{a}_h$ gives the output
!bt
\bm{a}_o=\bm{w}_h^T\begin{bmatrix} 0 & 0 \\
\bm{a}_o=\begin{bmatrix} 0 & 0 \\
1 & 0 \\
1 & 0 \\
2 & 1 \end{bmatrix}=\begin{bmatrix} 0 \\ 1 \\ 1 \\0\end{bmatrix},
2 & 1 \end{bmatrix}\begin{bmatrix} 1 \\
-2\end{bmatrix}=\begin{bmatrix} 0 \\ 1 \\ 1 \\0\end{bmatrix},
!et
the wanted result.
the wanted result. Pay attention to the dimensionalities as well.
!split
@@ -1321,8 +1323,6 @@ scores = logistic_regression.fit(X, yXOR, scheduler, epochs=1000)
!ec
Not bad, but the results depend strongly on the learning reate. Try different learning rates.
!split
===== Lecture Thursday October 26 =====