简体   繁体   English

Tensorflow 停止并恢复训练

[英]Tensorflow stop and resume training

I am using Tensorflow to train my model.我正在使用 Tensorflow 来训练我的 model。 I am routinely saving my model every 10 epochs.我通常每 10 个 epoch 保存一次 model。 I have a limited number of samples to train, so I am augmenting my dataset to make a larger training dataset.我要训练的样本数量有限,因此我正在扩充我的数据集以制作更大的训练数据集。

If I need to use my saved model to resume training after a power outage would it be best to resume training using the same dataset or to make a new dataset?如果我需要使用我保存的 model 在断电后恢复训练,最好是使用相同的数据集恢复训练还是制作一个新的数据集?

Your question very much depends on how you're augmenting your dataset.您的问题很大程度上取决于您如何扩充数据集。 If your augmentation skews the statistical distribution of the underlying dataset then you should resume training with the pre-power outage dataset.如果您的扩充扭曲了基础数据集的统计分布,那么您应该使用断电前的数据集恢复训练。 Otherwise, you're assuming that your augmentation has not changed the distribution of the dataset.否则,您假设您的扩充没有改变数据集的分布。

It is a fairly safe assumption to make (assuming your augmentations do not change the data in an extremely significant way) that you are safe to resume training on a new dataset or the old dataset without significant change in accuracy.这是一个相当安全的假设(假设您的扩充不会以极其显着的方式更改数据)您可以安全地在新数据集或旧数据集上恢复训练,而不会显着改变准确性。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Tensorflow 使用 MirroredStrategy() 恢复训练 - Tensorflow resume training with MirroredStrategy() 如何在张量流中从* .meta恢复训练? - How to resume training from *.meta in tensorflow? 是否可以从 Tensorflow 中的检查点 model 恢复训练? - Is it possible to resume training from a checkpoint model in Tensorflow? 我怎样才能停止模型训练并恢复它? - How can i stop model training and resume it? Keras - 没有停止和恢复训练的好方法? - Keras - no good way to stop and resume training? 如何使用 Tensorflow 2/Keras 保存和继续训练具有多个模型部分的 GAN - How to save and resume training a GAN with multiple model parts with Tensorflow 2/ Keras 如何从张量流检查点文件正确恢复网络训练? - How to resume properly the training of a network from a tensorflow checkpoint file? 有没有办法在使用 tensorflow 的 epoch 中停止训练? - Is there a way to stop training in the middle of an epoch with tensorflow? 如何停止 tensorflow 中的培训工作? - How can I stop a training job in tensorflow? Tensorflow Keras无法在初始时从检查点文件正确恢复训练 - Tensorflow Keras cannot properly resume training at initial epoch from checkpoint file
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM