Check failed: MaxTopBlobs() >= top.size() (2 vs. 3) Data Layer produces at most 2 top blob(s) as out

48 views
Skip to first unread message

Hossein Hasanpour

unread,
May 27, 2016, 5:34:18 AM5/27/16
to Caffe Users
I am trying  to train on Cifar100, and as you know it has two labels, coarse and fine. 
this is my data layer :
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
 
}
}


and this is how the last layers look like : 
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"
}

what is the problem here? I have seen people using more than two top blobs.! what am I missing here? 
Thanks in advance
Reply all
Reply to author
Forward
0 new messages