1. tf.gfile.LIstDirectory(filename)
返回文件夹(filename)的列表,类似于listdir,子文件夹只会返回文件夹名。
2. tf.image.decode_jpeg(jpeg_data,channels = depth)
jpeg_data = tf.placeholder(tf.string,name=''),将图片数据转化为tensor
3. tf.stack(values,axis = 0,name'stack')
组合为tensor,加一维
4. tf.cast(x,dtype)
转换tensor类型
5.tf.image.resize_bilinear(tensro_4d,resize_shape)
注意该函数必须是4维张量,可以通过expand_dims()和squeeze
6.tf.argmax(outputs,1)
返回最大索引
7. Tensor.eval(session = sess)
返回对应的np.array()
8. out_classes[prediction.eval(session = sess)]
花索引