Created using Colaboratory
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
"metadata": {
|
||||
"colab": {
|
||||
"provenance": [],
|
||||
"authorship_tag": "ABX9TyN/trn2b+dsX0Qcg4ZzNZEf",
|
||||
"authorship_tag": "ABX9TyNk5FN4qlw3pk8BwDVWw1jN",
|
||||
"include_colab_link": true
|
||||
},
|
||||
"kernelspec": {
|
||||
@@ -547,7 +547,7 @@
|
||||
"for c_step in range (n_steps):\n",
|
||||
" # Do gradient descent step\n",
|
||||
" phi_all[:,c_step+1:c_step+2] = stochastic_gradient_descent_step(phi_all[:,c_step:c_step+1],data, alpha =0.8, batch_size=5)\n",
|
||||
" # Measure loss and draw model every 4th step\n",
|
||||
" # Measure loss and draw model every 8th step\n",
|
||||
" if c_step % 8 == 0:\n",
|
||||
" loss = compute_loss(data[0,:], data[1,:], model, phi_all[:,c_step+1:c_step+2])\n",
|
||||
" draw_model(data,model,phi_all[:,c_step+1], \"Iteration %d, loss = %f\"%(c_step+1,loss))\n",
|
||||
|
||||
Reference in New Issue
Block a user