anirudhacharya commented on a change in pull request #12263: [MXNET-628] Fix 
example on text classification using LSTMs on IMDB dataset
URL: https://github.com/apache/incubator-mxnet/pull/12263#discussion_r211431483
 
 

 ##########
 File path: example/rnn/bucket_R/aclImdb_lstm_classification.R
 ##########
 @@ -40,20 +40,31 @@ optimizer <- mx.opt.create("adadelta", rho = 0.92, epsilon 
= 1e-06, wd = 2e-04,
 bucket_list <- unique(c(train.data$bucket.names, eval.data$bucket.names))
 
 symbol_buckets <- sapply(bucket_list, function(seq) {
-  rnn.graph(config = "seq-to-one", cell_type = "lstm", 
-            num_rnn_layer = 1, num_embed = 2, num_hidden = 6, 
-            num_decode = 2, input_size = vocab, dropout = 0.5, 
-            ignore_label = -1, loss_output = "softmax",
-            output_last_state = F, masking = T)
+  rnn.graph(config = "seq-to-one",
+            cell_type = "lstm",
+            num_rnn_layer = 1,
+            num_embed = 2,
+            num_hidden = 6,
+            num_decode = 2,
+            input_size = vocab,
+            dropout = 0.2,
 
 Review comment:
   the previous dropout rate of 0.5 would give ~0.81 accuracy on training data 
and ~0.8114 on test data. 
   A dropout rate of 0.2 gives ~0.84 on training data and ~0.8119 on test data.
   I just went around tweaking the values by intuition, there was no specific 
reference I was looking at.
   
   I will add this as a comment?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to