Skip to content

Commit f694462

Browse files
committed
Fix typo
1 parent 5acc0ce commit f694462

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

NeuralNetwork/Softmax/experiment-softmax.ipynb

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@
4848
" return 1/(1+np.exp(-z))\n",
4949
"\n",
5050
"def cost(activations, expectations):\n",
51-
" #return np.sum(expectations*np.log(activations), 1)\n",
5251
" return np.sum(-expectations*np.log(activations))"
5352
]
5453
},
@@ -321,7 +320,6 @@
321320
"for i in xrange(num_epochs):\n",
322321
" # feed forward\n",
323322
" z2 = np.dot(input, w2) + b2\n",
324-
" #z2 = np.dot(input, w2)\n",
325323
" a2 = sigmoid(z2) # 7x5\n",
326324
"\n",
327325
" z3 = np.dot(a2, w3) + b3\n",
@@ -340,21 +338,14 @@
340338
"\n",
341339
" # 7x2\n",
342340
" delta_l3 = a3 - output\n",
343-
" #deriv_w3 = np.dot(delta_l3, w3.T)*a2\n",
344341
" deriv_w3 = np.dot(a2.T, delta_l3)\n",
345342
" deriv_b3 = delta_l3\n",
346343
" w3 -= eta*deriv_w3\n",
347344
" b3 -= eta*np.mean(deriv_b3, 0)\n",
348345
" \n",
349346
" delta_l2 = np.dot(delta_l3, w3.T)*(a2*(1-a2)) # 7x5\n",
350-
" #print \"d2\", delta_l2\n",
351-
" #print \"w2\", w2\n",
352-
" # d: 7x5\n",
353-
" # w: 4x5\n",
354347
" deriv_w2 = np.dot(input.T, delta_l2)\n",
355348
" deriv_b2 = delta_l2\n",
356-
" #print deriv_w2\n",
357-
" #print deriv_b2\n",
358349
" w2 -= eta*deriv_w2\n",
359350
" b2 -= eta*np.mean(deriv_b2, 0)"
360351
]

0 commit comments

Comments
 (0)