Updated comments to make clearer.

This commit is contained in:
udlbook
2024-04-10 15:27:28 -04:00
parent d9138d6177
commit 5492ed0ee5

View File

@@ -1,18 +1,16 @@
{
"cells": [
{
"attachments": {},
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
"id": "view-in-github"
"id": "view-in-github",
"colab_type": "text"
},
"source": [
"<a href=\"https://colab.research.google.com/github/udlbook/udlbook/blob/main/Notebooks/Chap03/3_1_Shallow_Networks_I.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {
"id": "1Z6LB4Ybn1oN"
@@ -42,7 +40,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {
"id": "wQDy9UzXpnf5"
@@ -102,8 +99,8 @@
"source": [
"# Define a shallow neural network with, one input, one output, and three hidden units\n",
"def shallow_1_1_3(x, activation_fn, phi_0,phi_1,phi_2,phi_3, theta_10, theta_11, theta_20, theta_21, theta_30, theta_31):\n",
" # TODO Replace the lines below to compute the three initial lines\n",
" # (figure 3.3a-c) from the theta parameters. These are the preactivations\n",
" # TODO Replace the code below to compute the three initial lines\n",
" # from the theta parameters (i.e. implement equations at bottom of figure 3.3a-c). These are the preactivations\n",
" pre_1 = np.zeros_like(x)\n",
" pre_2 = np.zeros_like(x)\n",
" pre_3 = np.zeros_like(x)\n",
@@ -199,7 +196,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {
"id": "T34bszToImKQ"
@@ -210,7 +206,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {
"id": "jhaBSS8oIWSX"
@@ -269,7 +264,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {
"id": "osonHsEqVp2I"
@@ -354,9 +348,8 @@
],
"metadata": {
"colab": {
"authorship_tag": "ABX9TyPBNztJrxnUt1ELWfm1Awa3",
"include_colab_link": true,
"provenance": []
"provenance": [],
"include_colab_link": true
},
"kernelspec": {
"display_name": "Python 3",
@@ -368,4 +361,4 @@
},
"nbformat": 4,
"nbformat_minor": 0
}
}