How to feed caffe multi label data in HDF5 format?

前端 未结 2 1020
抹茶落季
抹茶落季 2020-11-30 07:20

I want to use caffe with a vector label, not integer. I have checked some answers, and it seems HDF5 is a better way. But then I\'m stucked with error like:

2条回答
  •  感动是毒
    2020-11-30 07:41

    Your accuracy layer makes no sense.

    The way accuracy layer works: in caffe accuracy layer expects two inputs
    (i) a predicted probability vector and
    (ii) ground-truth corresponding scalar integer label.
    The accuracy layer than checks if the probability of the predicted label is indeed the maximal (or within top_k).
    Therefore if you have to classify C different classes, your inputs are going to be N-by-C (where N is batch size) input predicted probabilities for N samples belonging to each of the C classes, and N labels.

    The way it is defined in your net: You input accuracy layer N-by-4 predictions and N-by-4 labels -- this makes no sense for caffe.

提交回复
热议问题