微信公众号:龙跃十二
我是小玉,一个平平无奇的小天才!
悄悄说,github上出了源码详解还有思维导图,答辩PPT,赶快去star!
我的github:https://github.com/ixiaoyu-tech/xiaoyu-project
在前边,我们将训练好的模型存储在指定路径下,这个时候我们的项目也就要接近尾声了,接下来我们需要的就是导入一副图像,做最后的图像测试。
文件名:test.py
代码详解:
def evaluate_one_image():
image_array=get_one_image_file("./data/test/68.jpg") #测试集路径,自己更改一下
with tf.Graph().as_default():
BATCH_SIZE = 1 # 获取一张图片
N_CLASSES = 2 #二分类
image = tf.cast(image_array, tf.float32)
image = tf