File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -271,8 +271,8 @@ follows:
271271 learning_rate=0.01
272272
273273 # specify how to update the parameters of the model as a dictionary
274- updates ={classifier.W: classifier.W - numpy.asarray( learning_rate) *g_W,\
275- classifier.b: classifier.b - numpy.asarray( learning_rate) *g_b}
274+ updates ={classifier.W: classifier.W - learning_rate*g_W,\
275+ classifier.b: classifier.b - learning_rate*g_b}
276276
277277 # compiling a Theano function `train_model` that returns the cost, but in
278278 # the same time updates the parameter of the model based on the rules
Original file line number Diff line number Diff line change @@ -204,10 +204,10 @@ parameters differ.
204204
205205 # specify how to update the parameters of the model as a dictionary
206206 updates = \
207- { W1: W1 - numpy.asarray( learning_rate) *g_W1 \
208- , b1: b1 - numpy.asarray( learning_rate) *g_b1 \
209- , W2: W2 - numpy.asarray( learning_rate) *g_W2 \
210- , b2: b2 - numpy.asarray( learning_rate) *g_b2 }
207+ { W1: W1 - learning_rate*g_W1 \
208+ , b1: b1 - learning_rate*g_b1 \
209+ , W2: W2 - learning_rate*g_W2 \
210+ , b2: b2 - learning_rate*g_b2 }
211211
212212 # compiling a theano function `train_model` that returns the cost, but
213213 # in the same time updates the parameter of the model based on the rules
You can’t perform that action at this time.
0 commit comments