如何将损耗收敛到较低的值?(tensorflow)

如何将损耗收敛到较低的值?(tensorflow),tensorflow,object-detection,object-detection-api,learning-rate,tensorflow-model-garden,Tensorflow,Object Detection,Object Detection Api,Learning Rate,Tensorflow Model Garden,我使用了tensorflow对象检测API。 这是我的环境。 所有图像均来自coco API Tensorflow version : 1.13.1 Tensorboard version : 1.13.1 Number of test images : 3000 Number of train images : 24000 Pre-trained model : SSD mobilenet v2 quantized 300x300 coco Number of detecting class

我使用了tensorflow对象检测API。
这是我的环境。
所有图像均来自coco API

Tensorflow version : 1.13.1
Tensorboard version : 1.13.1
Number of test images : 3000
Number of train images : 24000
Pre-trained model : SSD mobilenet v2 quantized 300x300 coco
Number of detecting class : 1(person)
这是我的火车配置

train_config: {
  batch_size: 6
  optimizer {
    adam_optimizer: {
        learning_rate {
            exponential_decay_learning_rate: {
        initial_learning_rate:0.000035
        decay_steps: 7
        decay_factor: 0.98      
          }
        }
      }
    }
  fine_tune_checkpoint: "D:/TF/models/research/object_detection/ssd_mobilenet_v2_quantized_300x300_coco_2019_01_03/model.ckpt"
  fine_tune_checkpoint_type:  "detection"
  num_steps: 200000
  data_augmentation_options {
    random_horizontal_flip {
    }
  }
  data_augmentation_options {
    ssd_random_crop {
    }
  }
}
我找不到最佳学习率、适当的衰减步骤和因子。
所以我做了很多训练,但都很相似。
我如何解决这个问题??
我已经花了一个星期来解决这个问题了。
在另一篇文章中,有人建议在数据集(图像)中添加一个噪声 但我不知道这是什么意思。

我怎样才能做到这一点呢?

我想另一篇文章提到的是通过向训练数据集中添加一些有噪声的图像来增加数据。这意味着您对输入应用了一些随机变换,以便模型能够更好地概括。 可以使用的一种噪声是随机高斯噪声(),它由patch在对象检测API中应用。 虽然看起来你有足够的训练图像,但值得一试。 噪音看起来像:

...
data_augmentation_options {
  random_horizontal_flip {
  }
}
data_augmentation_options {
  ssd_random_crop {
  }
}
data_augmentation_options {
  randompatchgaussian {
    // The patch size will be chosen to be in the range
    // [min_patch_size, max_patch_size). 
    min_patch_size: 300;
    max_patch_size: 300; //if you want the whole image to be noisy
  }
}
...
有关数据扩充列表,您可以检查:

关于学习率,一个常见的策略是尝试较大的学习率(例如0.02)和一个非常小的学习率,就像您已经尝试过的那样。我建议您尝试使用0.02,将其保留一段时间,或者使用指数衰减学习率,看看结果是否更好

更改批次大小也有一些好处,请尝试批次大小=2而不是6

我还建议您在看到培训中没有任何改进之前,不要进行更多步骤的培训,或者在您的配置中定义200000个步骤之前,不要进行培训

一些更深层次的策略可以帮助模型更好地执行,他们在回答这个问题时说:

这就是说,如果数据集制作正确,您应该在测试集上获得良好的结果