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