python
126 with tf.variable_scope("rnn"): 227 encoder_cell = rnn.BasicLSTMCell(self.num_hidden) 329 _, encoder_states = tf.nn.dynamic_rnn( 430 encoder_cell, encoder_input_emb, sequence_length=self.encoder_input_len, dtype=tf.float32)
python
132 with tf.variable_scope("decoder"): 233 decoder_cell = rnn.BasicLSTMCell(self.num_hidden)au 3 435 decoder_outputs, _ = tf.nn.dynamic_rnn( 536 decoder_cell, decoder_input_emb, sequence_length=self.decoder_input_len, 637 initial_state=encoder_states, dtype=tf.float32)
27行目、33行目にこのようなコードがあります
google coraboratoryで、実行すると、
python
1WARNING:tensorflow:From /content/auto_encoder.py:27: BasicLSTMCell.__init__ (from tensorflow.python.ops.rnn_cell_impl) is deprecated and will be removed in a future version. 2Instructions for updating: 3This class is deprecated, please use tf.nn.rnn_cell.LSTMCell, which supports all the feature this cell currently has. Please replace the existing code with tf.nn.rnn_cell.LSTMCell(name='basic_lstm_cell').
これは、BasicLSTMCell
は今古くて、サポートしてないから、tf.nn.rnn_cell.LSTMCell
を使って!ということと解釈しているのですが、
どうreplaceするのが適切でしょうか
self.num_hidden = 512
あなたの回答
tips
プレビュー