neural-network - 训练全卷积网络时忽略标签

标签 neural-network deep-learning caffe image-segmentation conv-neural-network

我正在 Caffe 中使用全卷积网络进行语义分割,使用 Cityscapes数据集。

这个script允许转换类的 ID,并表示将类的 ID 设置为在 255 处忽略,并“在训练期间忽略这些标签”。在实践中我们如何做到这一点?我的意思是,我如何“告诉”我的网络 255 不像其他整数那样是一个真正的类?

感谢您给了我背后的直觉。

最佳答案

使用,例如"SoftmaxWithLoss"层,你可以添加一个 loss_param {ignore_label: 255 } 来告诉 caffe 忽略这个标签:

layer {
  name: "loss"
  type: "SoftmaxWithLoss"
  bottom: "prediction"
  bottom: "labels_with_255_as_ignore"
  loss_weight: 1
  loss_param: { ignore_label: 255 }
}

我没有检查它,但我相信 ignore_label 也被 InfogainLoss 损失和其他一些损失层使用。

关于neural-network - 训练全卷积网络时忽略标签,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50043931/

相关文章:

neural-network - Caffe 可变批量大小

python - scipy.optimize.minimize 在神经网络中的使用

python - 机器学习模型预测错误结果

python - 我如何知道哪个预测针对哪个数据?那么,如何评估预测呢?

python - cl : Command line error D8021 : invalid numeric argument '/Wno-cpp'

machine-learning - Caffe意味着无需数据库即可创建文件

python - Python 中导入的 Spark 问题

python - 具有两个神经元的神经网络

python-3.x - TensorFlow 2.0 'build' 函数

machine-learning - 机器学习中面向 future 的特征扩展?