szha commented on a change in pull request #7093: add variational dropout to 
gluon ptb example
URL: https://github.com/apache/incubator-mxnet/pull/7093#discussion_r130951028
 
 

 ##########
 File path: example/gluon/word_language_model/train.py
 ##########
 @@ -70,8 +87,19 @@ def batchify(data, batch_size):
 
 
 ntokens = len(corpus.dictionary)
-model = model.RNNModel(args.model, ntokens, args.emsize, args.nhid,
-                       args.nlayers, args.dropout, args.tied)
+assert (not args.vardrop_out and not args.vardrop_state) or args.use_cell, \
+       'variational dropout is only available in cell API.'
+if not args.use_cell:
 
 Review comment:
   Alternative is duplicates. This is the simplest way to include example for 
RNN cells.
 
----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to