直接上代碼進行分析: """ Convolutional Neural Network.Build and train a convolutional neural network with TensorFlow.
This example is using the MNIST database of handwritten digits
(http://yann.lecun.com/exdb/mnist/)Author: Aymeric Damie
import tensorflow as tfimport numpy as npdef add_layer(inputs,in_size,out_size,activation_function=None): """initialize the Weights and biases""" Weights=tf.Variable(tf.random_normal([in_size,out_size])) biases