如何升级Tensorflow RNN编码器代码

时间:2019-07-12 12:45:56

标签: python tensorflow lstm recurrent-neural-network

我在Tensorflow 0.6中有以下代码(来自this link)。如何将其翻译为Tensorflow 1.13.1?

from tensorflow.models.rnn import rnn_cell
from tensorflow.models.rnn.rnn import rnn as rnn_encoder_factory

# inputs: list of 2D Tensors with shape [batch_size x self.input_size].
# start_state: 2D Tensor with shape [batch_size x self.state_size].
self.cell = rnn_cell.BasicLSTMCell(self.hidden_size)
return rnn_encoder_factory(self.cell, inputs, start_state)

0 个答案:

没有答案