【发布时间】:2019-04-02 18:52:23
【问题描述】:
尝试使用 tensorflow 对象检测 API 获取工作流。
我为我的训练集(4070 张图片)和验证集(1080 张图片)创建了一个 tfrecord。
训练进行 400 次迭代,然后切换到需要相当长的时间(大约 10 分钟)的评估,然后继续重复评估。我一直很困惑为什么我的表现很差,但我似乎只训练了 10 分钟,尽管跑了 24 小时。
评估配置是
eval_config {
num_visualizations: 30
num_examples: 30
eval_interval_secs: 600
max_evals: 1
include_metrics_per_category: true
batch_size: 1
}
eval_input_reader {
label_map_path: "D:/src/Wind/WindObjectDetector/data/labels.pbtxt"
shuffle: false
num_epochs: 1
num_readers: 1
tf_record_input_reader {
input_path: "D:/src/Wind/WindObjectDetector/data/val.record"
}
sample_1_of_n_examples: 1
}
训练配置:
train_config {
batch_size: 8
data_augmentation_options {
random_horizontal_flip {
}
}
data_augmentation_options {
ssd_random_crop {
}
}
optimizer {
rms_prop_optimizer {
learning_rate {
exponential_decay_learning_rate {
initial_learning_rate: 0.0010000000474974513
decay_steps: 1017
decay_factor: 0.949999988079071
}
}
momentum_optimizer_value: 0.8999999761581421
decay: 0.8999999761581421
epsilon: 1.0
}
}
fine_tune_checkpoint: "D:/src/Wind/WindObjectDetector/experiments/test2/tl/model.ckpt"
from_detection_checkpoint: true
num_steps: 25400
}
我真正想要的是我进行常规图像分类和分割的工作流程。也就是说,训练一个 epoch(num_images//batch_size 迭代)。然后评估一个时期的验证集,然后重复。因此,每个循环我都会看到每个图像一次,并对每个(验证)图像进行一次评估。在这一点上,我很乐意让它训练。
【问题讨论】:
标签: python tensorflow object-detection-api