Caffe:检查失败:MaxTopBlobs()> = top.size()(2对3)数据层产生最多2个顶部blob(s)

时间:2016-05-28 06:57:40

标签: caffe

我正在努力训练Cifar100,你知道它有两个标签,粗糙和精细。这是我的数据层:

name: "CIFAR100_full"
layer {
  name: "cifar"
  type: "Data"
  top: "data"
  top: "coarse_label"
  top: "fine_label"
  include {
    phase: TRAIN
  }
  transform_param {
    mean_file: "examples/cifar100/mean.binaryproto"
    mirror: true
  }


  data_param {
    source: "examples/cifar100/cifar100_train_leveldb"
    batch_size: 100
    backend: LEVELDB
  }
}
layer {
  name: "cifar"
  type: "Data"
  top: "data"
  top: "coarse_label"
  top: "fine_label"
  include {
    phase: TEST
  }
  transform_param {
    mean_file: "examples/cifar100/mean.binaryproto"
  }
  data_param {
    source: "examples/cifar100/cifar100_test_leveldb"
    batch_size: 50
    backend: LEVELDB
  }
}

这就是最后几层的样子:

layer {
  name: "accuracy"
  type: "Accuracy"
  bottom: "ip1"
  bottom: "coarse_label"
  bottom: "fine_label"
  top: "accuracy"
  include {
    phase: TEST
  }
}
layer {
  name: "loss"
  type: "SoftmaxWithLoss"
  bottom: "ip1"
  bottom: "coarse_label"
  bottom: "fine_label"
  top: "loss"
}

这是什么问题?我确定caffe图层支持多个输出blob;我在这里错过了什么?

我目前被迫使用HDF5Data,它不提供任何转换功能,例如均值减法和镜像。如果我坚持使用HDF5,我现在该如何进行均值减法和镜像?我可以使用caffe中的任何预处理层来弥补使用hdf5data层而不是leveldb或lmdb层吗?

0 个答案:

没有答案