title: Tensorflow: What's the difference between tf.nn.dropout and tf.contrib.rnn.DropoutWrapper?
body: <p>How's the following codes different?</p>
  
  <ul>
  <li><p>with tf.contrib.rnn.DropoutWrapper</p>
  
  <pre><code>enc_cell = tf.contrib.rnn.MultiRNNCell([tf.contrib.rnn.DropoutWrapper(tf.contrib.rnn.BasicLSTMCell(rnn_sizes, output_keep_prob=1-keep_prob) for _ in range(num_layers)])
  
  _, encoding_state = tf.nn.dynamic_rnn(enc_cell, rnn_inputs, dtype=tf.float32)
  </code></pre></li>
  <li><p>with tf.nn.droupout</p>
  
  <pre><code>enc_cell = tf.contrib.rnn.MultiRNNCell([tf.contrib.rnn.BasicLSTMCell(rnn_size) for _ in range(num_layers)])
  
  _, encoding_state = tf.nn.dynamic_rnn(enc_cell, tf.nn.dropout(rnn_inputs, 1 - keep_prob), dtype=tf.float32)
  </code></pre></li>
  </ul>
  
  <p>It seems that there is a difference in the number of states we get from tf.nn.dynamic_rnn. len(encoding state) is greater with tf.nn.dropout. </p>
  
  <p>An explanation will be highly appreciated.</p>
  
  <p>Thank you.</p>