Created using Colaboratory

This commit is contained in:
udlbook
2023-12-24 11:53:10 -05:00
parent b9ec83d5f5
commit 86387e2901

View File

@@ -4,7 +4,7 @@
"metadata": {
"colab": {
"provenance": [],
"authorship_tag": "ABX9TyNuR7X+PMWRddy+WQr4gr5f",
"authorship_tag": "ABX9TyOAC7YLEqN5qZhJXqRj+aHB",
"include_colab_link": true
},
"kernelspec": {
@@ -184,7 +184,9 @@
" A = np.ones((n_data, n_hidden+1))\n",
" for i in range(n_data):\n",
" for j in range(1,n_hidden+1):\n",
" # Compute preactivation\n",
" A[i,j] = x[i]-(j-1)/n_hidden\n",
" # Apply the ReLU function\n",
" if A[i,j] < 0:\n",
" A[i,j] = 0;\n",
"\n",