[英]Tensorflow networks in google colab, what happens when I re-run the script
I created a simple neural network with tensorflow and I am studying how the amount of epochs is affecting results.我用 tensorflow 创建了一个简单的神经网络,我正在研究时期的数量如何影响结果。 I use Google Colab for this purpose.为此,我使用 Google Colab。
Scenario:设想:
I noticed that when I re-run the script, the dataset is already downloaded and I am worried the model may be also kept in session memory..我注意到当我重新运行脚本时,数据集已经下载了,我担心 model 可能也会保存在 session memory 中。
My question is: if I re-run the script in google colab using option "Run after" with different epochs number, will this create new instance of the model and start training from 0, or will it start re-training already trained model?我的问题是:如果我在 google colab 中使用具有不同时期编号的选项“Run after”重新运行脚本,这会创建 model 的新实例并从 0 开始训练,还是开始重新训练已经训练的 model?
For example: I run the script and trained network for 10 epochs.例如:我运行脚本并训练网络 10 个 epoch。 I change the variable to 50 and re-run the script.我将变量更改为 50 并重新运行脚本。 Will it start training model from 0 to 50, or will it take already trained model and train for 50 more epochs, so 60 in total?它会开始从 0 到 50 训练 model,还是需要已经训练过的 model 并再训练 50 个 epoch,总共 60 个?
Is there any way to check for how many epochs the model was trained?有什么方法可以检查 model 训练了多少个纪元?
I created new script with network from tensorflow tutorial, added evaluation function after model compilation and before training and then after training.我从 tensorflow 教程创建了带有网络的新脚本,在 model 编译之后以及训练之前和训练之后添加了评估 function。
Answer: when re-running the script model is always trained from 0 epoch.答:当重新运行脚本 model 时,总是从 0 epoch 开始训练。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.