RNN的代码实现
from tensorflow.contrib import rnn
form tensorflow.examples.tutorials.mnist import input_data
mnist = input_data.read_data_sets("data/", one_hot=True)
#定义参数
batch_size = 128
#定义训练数据
x = tf.placeholder("float", [None, 28,28])
y = tf.placeholder("float", [None,10])
#定义w和b
wights = {
'out': tf.Variable(tf.random_normal([128, 10]))}
biases = {
'out': tf.Variable(tf.random_normal([10]))}