2016-07-15 64 views

回答

0

我想這樣做的最好辦法是爲你的學習速度創造了theano共享變量,通過共享變量的更新功能,並通過SET_VALUE方法變更,具體如下:

lr_shared = theano.shared(np.array(0.1, dtype=theano.config.floatX)) 
updates = lasagne.updates.rmsprop(..., learning_rate=lr_shared) 

... 

for epoch in range(num_epochs): 
    if epoch % 10 == 0: 
     lr_shared.set_value(lr_shared.get_value()/10) 

中當然你可以改變優化器和if codition,這只是一個例子。