Skip to content

Commit 1e6bce2

Browse files
committed
add comment
1 parent 9942cb8 commit 1e6bce2

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

code/lstm.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -368,11 +368,11 @@ def train(dim_proj=100,
368368
patience=10, # number of epoch to wait before early stop if no progress
369369
max_epochs=5000,
370370
dispFreq=100, # display to stdout the training progress every N updates
371-
activ=tensor.tanh,
371+
activ=tensor.tanh, # The activation function from Theano.
372372
decay_c=0., # weight decay for the classifier
373373
lrate=0.01, # learning rate for sgd (not used for adadelta and rmsprop)
374374
n_words=100000, # vocabulary size
375-
optimizer=adadelta,
375+
optimizer=adadelta, # sgd, adadelta and rmsprop available
376376
encoder='lstm',# can be removed must be lstm.
377377
saveto='lstm_model.npz',
378378
noise_std=0.,
@@ -382,7 +382,8 @@ def train(dim_proj=100,
382382
batch_size=16,
383383
valid_batch_size=16,
384384
dataset='imdb',
385-
use_dropout=False):
385+
use_dropout=False, # if False slightly faster, but worst test error
386+
):
386387

387388
# Model options
388389
model_options = locals().copy()

0 commit comments

Comments
 (0)