<p dir="auto">I am try to use RMSPropOptimizer to optimize parameters and I get NotImplementedError. <strong>But when I try AdamOptimizer, it works fine</strong>.</p>
<p dir="auto"><strong>BTW, when I try to find the problem, it seems I find the key point:</strong><br>
Here is part of my code:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="self.x = tf.placeholder(tf.int32, [None, sequence_length])  
point = tf.get_variable( [vocabulary_size])
........
........
outputs, states = rnn.rnn(lstm_cell, x_vec, initial_state=initial_state, sequence_length = self.real_length)
index     =    self.x[:, 0]
index  = tf.reshape(index, [-1,1])
index_point  =    tf.gather(point, index)
output   =  tf.mul(outputs[-1] ,   index_point)"><pre class="notranslate"><code class="notranslate">self.x = tf.placeholder(tf.int32, [None, sequence_length])  
point = tf.get_variable( [vocabulary_size])
........
........
outputs, states = rnn.rnn(lstm_cell, x_vec, initial_state=initial_state, sequence_length = self.real_length)
index     =    self.x[:, 0]
index  = tf.reshape(index, [-1,1])
index_point  =    tf.gather(point, index)
output   =  tf.mul(outputs[-1] ,   index_point)
</code></pre></div>
<p dir="auto">The key point is last line <code class="notranslate">output   =  tf.mul(outputs[-1] ,   index_point)</code>, when I change <code class="notranslate">index_point</code> to some others such as number <code class="notranslate">1</code>, <strong>the error disappear</strong>.<br>
And, when I try to use <code class="notranslate">bidirectional_rnn</code>, <strong>the error also can disappear</strong>.</p>
<p dir="auto">I use RMSPropOptimizer to optimize parameters, I get NotImplementedError. <strong>But when I change to use AdamOptimizer, it works fine.</strong></p>
<p dir="auto">So I try to fix the problem and I find some key point, may be it can help.<br>
Here is my code:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="self.x = tf.placeholder(tf.int32, [None, sequence_length])  
point = tf.get_variable([len(embedding_matrix)])
............
............
outputs, states = rnn.rnn(lstm_cell, x, initial_state=initial_state, sequence_length=real_length)
index     =    self.x[:, 0]
index  = tf.reshape(index, [-1,1])
index_point  =    tf.gather(pointt, index)
output   =  tf.mul(outputs[-1] ,   index_point)

scores = tf.nn.xw_plus_b(output, self.W, b)
losses = tf.nn.softmax_cross_entropy_with_logits(scores, self.input_y)
self.loss = tf.reduce_mean(losses) 
optimizer = tf.train.RMSPropOptimizer(1e-3, decay = 0.9)
grads_and_vars = optimizer.compute_gradients(self.loss)
self.train_op = optimizer.apply_gradients(grads_and_vars)"><pre class="notranslate"><code class="notranslate">self.x = tf.placeholder(tf.int32, [None, sequence_length])  
point = tf.get_variable([len(embedding_matrix)])
............
............
outputs, states = rnn.rnn(lstm_cell, x, initial_state=initial_state, sequence_length=real_length)
index     =    self.x[:, 0]
index  = tf.reshape(index, [-1,1])
index_point  =    tf.gather(pointt, index)
output   =  tf.mul(outputs[-1] ,   index_point)

scores = tf.nn.xw_plus_b(output, self.W, b)
losses = tf.nn.softmax_cross_entropy_with_logits(scores, self.input_y)
self.loss = tf.reduce_mean(losses) 
optimizer = tf.train.RMSPropOptimizer(1e-3, decay = 0.9)
grads_and_vars = optimizer.compute_gradients(self.loss)
self.train_op = optimizer.apply_gradients(grads_and_vars)
</code></pre></div>
<p dir="auto">When I try to change the line <code class="notranslate">output   =  tf.mul(outputs[-1] ,   index_point)</code> to some others such as <code class="notranslate">output   =  tf.mul(outputs[-1] ,   2)</code>, <strong>the error disappear</strong>. And I try to change to use <code class="notranslate">bidirectional_rnn</code>, <strong>the error also disappear.</strong></p>