#coding:utf-8 import tensorflow as tf from PIL import Image,ImageFilter from tensorflow.examples.tutorials.mnist import input_data def imageprepare(argv): # 该函数读一张图片,处理后返回一个数组,进到网络中预测 """ This function returns the pixel values. The imput is…
#coding:utf-8 import tensorflow as tf x = tf.Variable([1,2]) a = tf.constant([3,3]) #增加一个减法op sub = tf.subtract(x,a) #增加一个加法op add = tf.add(x,sub) #有变量 一定要初始化 初始化所有的变量 init = tf.global_variables_initializer() with tf.Session() as sess: sess.run(init)…