Skip to content

Commit 6b7b7a6

Browse files
committed
use adadelta, sgd do not work.
1 parent 401a99a commit 6b7b7a6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

code/lstm.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,14 +375,14 @@ def pred_error(f_pred, prepare_data, data, iterator, verbose=False):
375375

376376

377377
def test_lstm(
378-
dim_proj=128, # TODO: What is this
378+
dim_proj=128, # word embeding dimension and LSTM number of hidden units.
379379
patience=10, # number of epoch to wait before early stop if no progress
380380
max_epochs=5000, # The maximum number of epoch to run
381381
dispFreq=10, # display to stdout the training progress every N updates
382382
decay_c=0., # weight decay for the classifier applied to the U weights.
383383
lrate=0.0001, # learning rate for sgd (not used for adadelta and rmsprop)
384384
n_words=10000, # vocabulary size
385-
optimizer=sgd, # sgd, adadelta and rmsprop available
385+
optimizer=adadelta, # sgd, adadelta and rmsprop available, sgd very hard to use, not recommanded (probably need momentum and decay learning rate).
386386
encoder='lstm', # TODO: can be removed must be lstm.
387387
saveto='lstm_model.npz', # The best model will be saved there
388388
validFreq=10000, # after 1000

0 commit comments

Comments
 (0)