classes = {'daffodil', 'snowdrop', 'lilyvalley', 'bluebell'}
for index, name in enumerate(classes):
print(index, name)
0 snowdrop
1 bluebell
2 lilyvalley
3 daffodil
classes = ['daffodil', 'snowdrop', 'lilyvalley', 'bluebell']
for index, name in enumerate(classes):
print(index, name)
0 daffodil
1 snowdrop
2 lilyvalley
3 bluebell
classes = ('daffodil', 'snowdrop', 'lilyvalley', 'bluebell')
for index, name in enumerate(classes):
print(index, name)
0 daffodil
1 snowdrop
2 lilyvalley
3 bluebell
可视化深度学习工具,神器,待探索
# 模型存储与恢复实例化
saver = tf.train.Saver()
# 恢复存储模型
ckpt = tf.train.get_checkpoint_state(MODEL_SAVE_PATH)
if ckpt and ckpt.model_checkpoint_path:
saver.restore(sess, ckpt.model_checkpoint_path)
with tf.Session() as sess:
ckpt = tf.train.get_checkpoint_state(MODEL_SAVE_PATH)
if ckpt and ckpt.model_checkpoint_path:
saver.restore(sess, ckpt.model_checkpoint_path)
在网上随便找了一个鲜花的图片集,制作成tfrecords数据集输入搭建的卷积神经网络,进行训练