Check failed: datum_channels > 0 (0 vs. 0) with non-image data

299 views
Skip to first unread message

Alex Ter-Sarkisov

unread,
Jun 14, 2017, 9:21:38 AM6/14/17
to Caffe Users
I use features as inputs in a ConvNN, dimensions 4096x19x32. Input layer looks like 

layer{
  name: "data"
  type: "Data"
  top: "data"
  #input_param { shape: {dim:20 dim: 4096 dim: 19 dim: 32 } }
  data_param {
     source: "train1lmdb"
     batch_size: 20
     backend: LMDB
  }
  include {
    phase: TRAIN
  }

}

The error I get is Check failed: datum_channels > 0 (0 vs. 0), so I guess caffe requies a Datum object; I created a blobproto object with pycaffe's array_to_blobproto().

It works if I change the layer type to "Input" and uncomment the input_param, but I know it's wrong and there's some error, as training/validation errors go to 0. 

What am I doing wrong? 

Przemek D

unread,
Jun 19, 2017, 6:56:32 AM6/19/17
to Caffe Users
Is your database properly created? It looks like it was read okay, but the datum it contains has zero channels.
Reply all
Reply to author
Forward
0 new messages