【问题标题】:Tensorflow object detection (ssd - mobilnet_v1) not convergingTensorflow 对象检测 (ssd - mobilnet_v1) 不收敛
【发布时间】:2018-10-15 08:56:13
【问题描述】:

我正在尝试在 tensorflow 对象检测 api 上训练深度时尚数据集。每个类中的类别和对应的图像数量如下。

{'Blouse': 24562, 'Cutoffs': 1669, 'Cardigan': 13311, 'Button-Down': 330, 'Poncho': 791, 'Chinos': 527, 'Top': 10078, 'Anorak': 160, 'Kimono': 2294, 'Blazer': 7497, 'Robe': 150, 'Parka': 676, 'Jodhpurs': 45, 'Sarong': 32, 'Shorts': 19624, 'Caftan': 54, 'Turtleneck': 146, 'Leggings': 5013, 'Jersey': 727, 'Hoodie': 4010, 'Culottes': 486, 'Sweater': 13123, 'Flannel': 324, 'Jeggings': 594, 'Tank': 15418, 'Onesie': 70, 'Coat': 2120, 'Sweatpants': 3021, 'Henley': 716, 'Jacket': 10425, 'Gauchos': 49, 'Sweatshorts': 1098, 'Romper': 7408, 'Joggers': 4405, 'Trunks': 386, 'Halter': 34, 'Dress': 144316, 'Jeans': 14152, 'Tee': 73333, 'Coverup': 34, 'Capris': 154, 'Kaftan': 252, 'Peacoat': 194, 'Bomber': 618, 'Skirt': 29546, 'Jumpsuit': 12306}

总共有 46 个班级。 我的总损失图似乎没有下降。迄今为止最好的大约是 4。This 是我的图表。 这对于这么多类是正常的还是我应该使用其他算法?

我的另一个疑问是模型已经训练了大约 3 天。我没有GPU。我应该停止训练过程吗?

编辑:

train_config: {
  batch_size: 24
  optimizer {
    rms_prop_optimizer: {
      learning_rate: {
        exponential_decay_learning_rate {
          initial_learning_rate: 0.004
          decay_steps: 800720
          decay_factor: 0.95
        }
      }
      momentum_optimizer_value: 0.9
      decay: 0.9
      epsilon: 1.0
    }
  }

硬件信息:

{
Architecture:        x86_64
CPU op-mode(s):      32-bit, 64-bit
Byte Order:          Little Endian
CPU(s):              6
On-line CPU(s) list: 0-5
Thread(s) per core:  1
Core(s) per socket:  2
Socket(s):           3
NUMA node(s):        1
Vendor ID:           GenuineIntel
CPU family:          6
Model:               63
Model name:          Intel(R) Xeon(R) CPU E5-2683 v3 @ 2.00GHz
Stepping:            2
CPU MHz:             1997.686
BogoMIPS:            3995.37
Hypervisor vendor:   VMware
Virtualization type: full
L1d cache:           32K
L1i cache:           32K
L2 cache:            256K
L3 cache:            35840K
NUMA node0 CPU(s):   0-5
Flags:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon nopl xtopology tsc_reliable nonstop_tsc pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm fsgsbase tsc_adjust bmi1 avx2 smep bmi2 invpcid xsaveopt arat
}

我是张量流的新手。任何形式的帮助将不胜感激。 提前致谢。

【问题讨论】:

    标签: python tensorflow object-detection-api


    【解决方案1】:
    1. 除非您给出您正在使用的确切损失,否则总损失的值并不是很有用,而且除非您已经尝试过这种损失,否则它也不是指示性的。相反,提供更多信息的值是您的模型在测试集上的性能指标。
    2. 除非您说明您正在使用的硬件,否则时间也不是很有指示性。相反,请说明迭代次数和批量大小,以及训练数据的大小或训练模型的 epoch 数。
    3. 您是否使用了衰减学习率?如果您使用恒定的学习率:(1)具有较大的值 - 那么收敛的可能性较小; (2) 值小 - 可能需要很长时间才能收敛。

    【讨论】:

    • 添加了更多信息
    • 您最好提及 epoch 数或迭代次数、批量大小和训练集大小。在我看来,您正在使用的decay_steps 很大(它实际上没有衰减)。尝试将其降低到 10k 左右,也可以将 decay_factor 降低到 0.9。
    猜你喜欢
    • 2019-06-09
    • 2016-10-24
    • 1970-01-01
    • 2017-12-22
    • 1970-01-01
    • 2020-06-17
    • 1970-01-01
    • 2023-03-06
    • 2021-11-12
    相关资源
    最近更新 更多