Update 6_3_Stochastic_Gradient_Descent.ipynb
This commit is contained in:
@@ -518,7 +518,7 @@
|
|||||||
" # at each step\n",
|
" # at each step\n",
|
||||||
" # You can use the function np.random.permutation to generate a random permutation of the n_data = data.shape[1] indices\n",
|
" # You can use the function np.random.permutation to generate a random permutation of the n_data = data.shape[1] indices\n",
|
||||||
" # and then just choose the first n=batch_size of these indices. Then compute the gradient update\n",
|
" # and then just choose the first n=batch_size of these indices. Then compute the gradient update\n",
|
||||||
" # from just the data with these indices. More properly, you should sample with replacement, but this will do for now.\n",
|
" # from just the data with these indices. More properly, you should sample without replacement, but this will do for now.\n",
|
||||||
"\n",
|
"\n",
|
||||||
"\n",
|
"\n",
|
||||||
" return phi"
|
" return phi"
|
||||||
@@ -583,4 +583,4 @@
|
|||||||
"outputs": []
|
"outputs": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user