简体   繁体   English

在使用 Tensorflow 对象检测 API 训练一定数量的步骤后更改配置文件中的训练参数

[英]Change training parameters in the config file after training for a certain number of steps using the Tensorflow Object Detection API

I have trained an Inception Resnet v2 model on a dataset for 61000 steps so far with the following values in the configuration file of the model:到目前为止,我已经在 61000 步的数据集上训练了一个 Inception Resnet v2 模型,在模型的配置文件中使用以下值:

adam_optimizer: {
      learning_rate: {
        manual_step_learning_rate {
          initial_learning_rate: 0.0003
          schedule {
            step: 150000
            learning_rate: .0001
          }

Now, If I want to reduce the learning rate of my model from now on, will making the below change:现在,如果我想从现在开始降低模型的学习率,将进行以下更改:

adam_optimizer: {
      learning_rate: {
        manual_step_learning_rate {
          initial_learning_rate: 0.0003
          schedule {
            step: 60000
            learning_rate: .0001
          }

And restarting from the checkpoint actually reduces the learning rate of my model from 0.0003 to 0.0001 since the number of steps that it has already trained for so far is greater than 60000?从检查点重新开始实际上将我的模型的学习率从0.00030.0001因为它到目前为止已经训练的步数大于 60000? If not, is there any other way to achieve this?如果没有,有没有其他方法可以实现这一目标?

One possible way is to use the already trained 61000 steps model file as the fine-tune checkpoint and then you can modify the lr as you like.一种可能的方法是使用已经训练好的 61000 步模型文件作为微调检查点,然后您可以根据需要修改 lr。 In this case, you are essentially training from step 1.在这种情况下,您实际上是从第 1 步开始训练。

转到您的配置文件并搜索此节点,然后添加粗线 train_config: { num_steps: 5000

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

相关问题 如何减少 Tensorflow 的对象检测 API 中的训练步骤数? - How to reduce the number of training steps in Tensorflow's Object Detection API? 在使用Tensorflow对象检测API进行训练时,我如何知道步骤总数? - How do I know the total number of steps while training using Tensorflow Object Detection API? 如何在tensorflow对象检测api中生成用于训练和推理的.ckpt文件 - How to generate .ckpt file for training and inference in tensorflow object detection api TensorFlow对象检测API训练错误 - TensorFlow Object Detection API training error Tensorflow 对象检测 API 中的训练和验证准确性 - Training and Validation Accuracy in Tensorflow Object Detection API TensorFlow object 检测 API 评估训练性能 - TensorFlow object detection API evaluate training performance tensorflow对象检测API训练和导出图 - tensorflow object detection API training and export graph 在 tensorflow object 检测 API 之后从训练和测试数据中裁剪所有边界框 - Crop all bounding boxes from training and testing data after tensorflow object detection API 运行TensorFlow对象检测API模型训练时出错 - Errors when running TensorFlow object detection API model training 缺少用于在 TensorFlow 的对象检测 API 中进行训练的模块和属性 - Missing modules and attributes for training in TensorFlow's Object Detection API
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM