tensorflow点滴笔记

1、模型保存 

模型保存需要使用函数 tf.train.Saver(),

a)创建saver时,可以指定需要存储的tensor,如果没有指定,则全部保存。

b) 创建saver时,可以指定保存的模型个数,利用max_to_keep=4,则最终会保存4个模型。

c) saver.save()函数里面可以设定global_step,说明是哪一步保存的模型。

d) 程序结束后,会生成四个文件:存储网络结构.meta、存储训练好的参数.data和.index、记录最新的模型checkpoint。

示例: saver.save(sess, "model_ame, global_step=epoch)

 https://blog.csdn.net/liuxiao214/article/details/79048136

2、

猜你喜欢

转载自www.cnblogs.com/ying-chease/p/9255526.html