首页 分享 tensorflow保存和加载训练进度

tensorflow保存和加载训练进度

来源:花匠小妙招 时间:2024-09-15 13:55

tf.train.Checkpoint : 用于创建checkpoint

tf.train.Checkpoint:

tf.train.Checkpoint(

root=None, **kwargs

)

TensorFlow objects may contain trackable state, such as tf.Variables, tf.keras.optimizers.Optimizer implementations, tf.data.Dataset iteratorstf.keras.Layer implementations, or tf.keras.Model implementations. These are called trackable objects.

# 例子

model = tf.keras.Model(...)

checkpoint = tf.train.Checkpoint(model)

# Save a checkpoint to /tmp/training_checkpoints-{save_counter}. Every time

# checkpoint.save is called, the save counter is increased.

save_path = checkpoint.save('/tmp/training_checkpoints')

# Restore the checkpointed values to the `model` object.

checkpoint.restore(save_path)

相关知识

tensorflow保存和加载训练进度
TensorFlow入门
基于TensorFlow的CNN卷积网络模型花卉分类(1)
TensorFlow学习记录(八)
Tensorflow鸢尾花分类(数据加载与特征处理)
花卉识别(tensorflow)
基于tensorflow的花卉识别
Tensorflow训练鸢尾花数据集
TensorFlow 2建立神经网络分类模型——以iris数据为例
基于深度学习和迁移学习的识花实践

网址: tensorflow保存和加载训练进度 https://www.huajiangbk.com/newsview133228.html

所属分类:花卉
上一篇: 郁金香种球怎么保存
下一篇: 植物花粉生活力测定技术

推荐分享