質問編集履歴

1

記載するコードの幅を広くした

2019/01/20 13:43

投稿

yukit5669
yukit5669

スコア15

test CHANGED
File without changes
test CHANGED
@@ -1,8 +1,28 @@
1
1
  ```python
2
2
 
3
- 27 encoder_cell = rnn.BasicLSTMCell(self.num_hidden)
3
+ 26 with tf.variable_scope("rnn"):
4
4
 
5
+ 27 encoder_cell = rnn.BasicLSTMCell(self.num_hidden)
6
+
7
+ 29 _, encoder_states = tf.nn.dynamic_rnn(
8
+
9
+ 30 encoder_cell, encoder_input_emb, sequence_length=self.encoder_input_len, dtype=tf.float32)
10
+
11
+ ```
12
+
13
+ ```python
14
+
15
+ 32 with tf.variable_scope("decoder"):
16
+
5
- 33 decoder_cell = rnn.BasicLSTMCell(self.num_hidden)
17
+ 33 decoder_cell = rnn.BasicLSTMCell(self.num_hidden)au
18
+
19
+
20
+
21
+ 35 decoder_outputs, _ = tf.nn.dynamic_rnn(
22
+
23
+ 36 decoder_cell, decoder_input_emb, sequence_length=self.decoder_input_len,
24
+
25
+ 37 initial_state=encoder_states, dtype=tf.float32)
6
26
 
7
27
  ```
8
28