File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 ()
You can’t perform that action at this time.
0 commit comments