层全专题

Tensorflow实现的MNIST数据集的2层卷积2层全连接网络

import tensorflow as tf"""h=w 图片尺寸f=卷积核p=padding 边界填补 ‘SAME’补充s=strides 每一次走的步长(h-f+2*p)/s + 1"""# 10 分类,输入图片尺寸 784*784n_input=784n_output=10# 获取数据MNISTmnist=('data/',one_hot = True)weight