<p>在1.0版中,东西到处移动。我也有过类似的搜索更新<code>tf.nn.rnn_cell.LSTMCell</code>到<code>tf.contrib.rnn.BasicLSTMCell</code>。</p>
<p>对于你的情况,<code>tf.nn.rnn_cell._linear</code>现在存在于<code>tf.contrib.rnn.python.ops.core_rnn_cell_impl</code>以及<code>BasicRNNCell</code>的定义中。检查<a href="https://www.tensorflow.org/api_docs/python/tf/contrib/rnn/BasicRNNCell" rel="nofollow noreferrer">BasicRNNCell docs</a>和<a href="https://github.com/tensorflow/tensorflow/blob/master/tensorflow/contrib/rnn/python/ops/core_rnn_cell_impl.py#L113-L118" rel="nofollow noreferrer">source code</a>,我们在L113-L118中看到了使用{u线性。</p>
<pre><code> def __call__(self, inputs, state, scope=None):
"""Most basic RNN: output = new_state = act(W * input + U * state + B)."""
with _checked_scope(self, scope or "basic_rnn_cell", reuse=self._reuse):
output = self._activation(
_linear([inputs, state], self._num_units, True))
return output, output
</code></pre>
<p>线性方法在<a href="https://github.com/tensorflow/tensorflow/blob/master/tensorflow/contrib/rnn/python/ops/core_rnn_cell_impl.py#L854" rel="nofollow noreferrer">line 854</a>定义为:<br/>
<code>Linear map: sum_i(args[i] * W[i]), where W[i] is a variable.</code></p>
<p>祝你好运!</p>