简体   繁体   English

如何在张量流中从* .meta恢复训练?

[英]How to resume training from *.meta in tensorflow?

In the latest version of tensorflow, when I save the model I find two files are produced: model_xxx and model_xxx.meta. 在最新版本的tensorflow中,当我保存模型时,我发现生成了两个文件:model_xxx和model_xxx.meta。

Does model_xxx.meta specify the network? model_xxx.meta是否指定网络? Can I resume training using model_xxx and model_xxx.meta without specify the network in the code? 我可以在不指定代码网络的情况下使用model_xxx和model_xxx.meta恢复训练吗? What about training queue structure, are they stored in model_xxx.meta? 训练队列的结构如何,它们存储在model_xxx.meta中吗?

Not sure if this will work for you, but at least for DNNCLassifiers you can specify the model_dir parameter when creating it and that will construct the model from the files and then you can continue the training. 不知道这是否对您DNNCLassifiers ,但是至少对于DNNCLassifiers您可以在创建模型时指定model_dir参数,该参数将从文件中构建模型,然后您可以继续进行训练。

For the DNNClassifiers you specify model_dir when first creating the object and the training will store checkpoints and other files on this directory. 对于DNNClassifiers您在首次创建对象时指定model_dir ,并且训练会将检查点和其他文件存储在此目录中。 You can come then after that, and create another DNNClassifier specifying the same model_dir and that will restore your pre-trained model. 然后,您可以接着创建另一个DNNClassifierDNNClassifier指定相同的model_dir ,这将还原您的预训练模型。

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

相关问题 如何从张量流检查点文件正确恢复网络训练? - How to resume properly the training of a network from a tensorflow checkpoint file? 是否可以从 Tensorflow 中的检查点 model 恢复训练? - Is it possible to resume training from a checkpoint model in Tensorflow? Tensorflow 停止并恢复训练 - Tensorflow stop and resume training Tensorflow 使用 MirroredStrategy() 恢复训练 - Tensorflow resume training with MirroredStrategy() TensorFlow/Keras:如何使用 model.checkpoint() 恢复训练? - TensorFlow/Keras: How to resume training using model.checkpoint()? 如何使用 Tensorflow 2/Keras 保存和继续训练具有多个模型部分的 GAN - How to save and resume training a GAN with multiple model parts with Tensorflow 2/ Keras Tensorflow Keras无法在初始时从检查点文件正确恢复训练 - Tensorflow Keras cannot properly resume training at initial epoch from checkpoint file 正确加载模型以恢复训练(元图,ckpts) - Correctly loading a model to resume training (meta graph, ckpts) 训练时如何从Tensorflow重置AdamOptimizer - How to reset the AdamOptimizer from Tensorflow while training 我正在尝试从某个检查点(Tensorflow)恢复训练,因为我使用的是 Colab,而 12 小时还不够 - I am trying to resume training from a certain checkpoint (Tensorflow) because I'm using Colab and 12 hours aren't enough
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM