#coding:utf-8
import tensorflow as tf
import input_data
#加载mnist数据集
mnist = input_data.read_data_sets('mnist/',one_hot=True)
#定义参数
learning_rate = 0.01
epochs = 50000
batch_size = 128
n_inputs = 28
n_steps = 28
n_hidden_units = 128
n_classes = 10
xs = tf.placeholder(tf.float32,[None,n_steps,n_inputs]) #输入形状
ys = tf.placeh
tensorflow构建RNN识别mnist手写数字
最新推荐文章于 2024-04-21 15:30:52 发布