一层的lstm效果不是很好,使用两层的lstm,代码如下。
1 with graph.as_default(): 2 inputs_ = tf.placeholder(tf.int32, [None, seq_len], name='inputs') 3 labels_ = tf.placeholder(tf.int32, [None, 4], name='labels') 4 keep_prob = tf.placeholder(tf.float32, name='keep_prob'
一层的lstm效果不是很好,使用两层的lstm,代码如下。
1 with graph.as_default(): 2 inputs_ = tf.placeholder(tf.int32, [None, seq_len], name='inputs') 3 labels_ = tf.placeholder(tf.int32, [None, 4], name='labels') 4 keep_prob = tf.placeholder(tf.float32, name='keep_prob'