【问题标题】:How to set minimum learning rate inside pipeline.config (tensorflow 1.15 + object detection API)如何在 pipeline.config 中设置最小学习率(tensorflow 1.15 + 对象检测 API)
【发布时间】:2021-08-27 14:47:35
【问题描述】:

我正在使用这段 pipeline.config 训练模型:

  optimizer {
    momentum_optimizer: {
      learning_rate: {
        cosine_decay_learning_rate {
          learning_rate_base: 0.3
          total_steps: 200000
          warmup_learning_rate: 0.13333
          warmup_steps: 2000
        }
      }
      momentum_optimizer_value: 0.9
    }
    use_moving_average: false
  }

在 200k epochs 之后,学习率下降到 0

两个问题:

  • 有没有办法在上述 200k epochs 之后设置最小学习率(例如 0.0001)而不达到零?
  • 有没有办法添加另一组具有固定学习率的 epoch(例如 100k)以继续训练?

我正在使用 tensorflow 1.15、object_detection API 和 python 3.6

【问题讨论】:

    标签: python tensorflow object-detection-api


    【解决方案1】:

    你不能。您只能使用ExponentialDecayLearningRate 做到这一点。见the source

    message ExponentialDecayLearningRate {
      optional float initial_learning_rate = 1 [default = 0.002];
      optional uint32 decay_steps = 2 [default = 4000000];
      optional float decay_factor = 3 [default = 0.95];
      optional bool staircase = 4 [default = true];
      optional float burnin_learning_rate = 5 [default = 0.0];
      optional uint32 burnin_steps = 6 [default = 0];
    > optional float min_learning_rate = 7 [default = 0.0];
    }
    

    【讨论】:

      猜你喜欢
      • 2019-12-13
      • 1970-01-01
      • 1970-01-01
      • 2021-07-06
      • 2016-04-28
      • 2019-03-03
      • 1970-01-01
      • 2021-05-16
      相关资源
      最近更新 更多