TensorFlow对象检测配置文件中的“num_examples:2000”是啥意思?

Posted

技术标签:

【中文标题】TensorFlow对象检测配置文件中的“num_examples:2000”是啥意思?【英文标题】:What does "num_examples: 2000" mean in TensorFlow object detection config file?TensorFlow对象检测配置文件中的“num_examples:2000”是什么意思? 【发布时间】:2018-04-15 15:30:21 【问题描述】:

在TensorFlow对象检测的示例管道配置文件中,有这个sn-p:

  eval_config: 
    num_examples: 2000
    # Note: The below line limits the evaluation process to 10 evaluations.
    # Remove the below line to evaluate indefinitely.
    max_evals: 10
  

“num_examples”是指每次评估运行使用相同的前 2000 张图像,还是将测试集视为循环缓冲区并每次使用不同的 2000 张图像?

【问题讨论】:

【参考方案1】:

num_example 等于您输入 API 的测试图像的数量

【讨论】:

【参考方案2】:

实际上,这意味着每次评估运行中只会使用评估数据集中的 相同 num_examples 个样本。

【讨论】:

【参考方案3】:

TL;DR 如果有足够的num_epochs 而没有shuffle,则循环缓冲区

我相信它可以与输入阅读器配置“协作”。如果在eval_input_reader 中将num_epochs 设置为1,那么它将处理输入队列中的前2000 张图像,前提是shuffle = false,否则会处理一些随机的2000 张图像。如果您没有 2000 张图像,它可能会失败,因为队列已清空。

相关代码为here和here

【讨论】:

num_epochsInputReaderprotobufis 0中的默认值。如果我理解正确,在这种情况下,测试集将无限循环通过 2000 张图像,是吗?

以上是关于TensorFlow对象检测配置文件中的“num_examples:2000”是啥意思?的主要内容,如果未能解决你的问题,请参考以下文章

动态编辑用于 TensorFlow 对象检测的管道配置

tensorflow.config

如何修改 ssd mobilenet 配置以使用 tensorflow 对象检测 API 检测小对象?

在 Tensorboard 中显示更多图像 - Tensorflow 对象检测

TensorFlow 对象检测管道配置中 data_augmentation_options 的可能值是啥?

Tensorflow 对象检测 API - 验证丢失行为