Input size incompatible with convolution kernel on some datasets

131 views
Skip to first unread message

mathiasj

unread,
Mar 10, 2017, 6:31:59 PM3/10/17
to Caffe Users
Hello,
I have a kind of strange issue using caffe (in combination with Nvidia digits). I have two datasets that contain different images but are otherwise exactly the same. Training my model on one of them is completely fine, but when I try to train it on the other one, I get the following error message after a couple of seconds:

Test net output #1: loss = 0.693147 (* 1 = 0.693147 loss)
Iteration 0 (0 iter/s, 1.1473s/12 iter), loss = 0.693147
Train net output #0: loss = 0.693147 (* 1 = 0.693147 loss)
Iteration 0, lr = 0.0001
Iteration 12 (5.56821 iter/s, 2.15509s/12 iter), loss = 0.692577
Train net output #0: loss = 0.692577 (* 1 = 0.692577 loss)
Iteration 12, lr = 0.0001
Iteration 24 (12.6555 iter/s, 0.948201s/12 iter), loss = 0.689232
Train net output #0: loss = 0.689232 (* 1 = 0.689232 loss)
Iteration 24, lr = 0.0001
Iteration 36 (12.613 iter/s, 0.951401s/12 iter), loss = 0.683208
Train net output #0: loss = 0.683208 (* 1 = 0.683208 loss)
Iteration 36, lr = 0.0001
Iteration 48 (12.624 iter/s, 0.950571s/12 iter), loss = 0.688377
Train net output #0: loss = 0.688377 (* 1 = 0.688377 loss)
Iteration 48, lr = 0.0001
Iteration 60 (12.6294 iter/s, 0.950167s/12 iter), loss = 0.68101
Train net output #0: loss = 0.68101 (* 1 = 0.68101 loss)
Iteration 60, lr = 0.0001
Check failed: bottom[0]->shape(channel_axis_) == channels_ (1 vs. 3) Input size incompatible with convolution kernel.

This is really strange as the error message suggests that something about the layout of my model was wrong, while the only thing I change was the dataset. Do you have any ideas what could cause this issue?

Thanks.

mathiasj

unread,
Mar 13, 2017, 5:01:49 AM3/13/17
to Caffe Users
It looks like converting the images to RGB (using the provided Digits checkbox when creating the dataset) did the trick.
Reply all
Reply to author
Forward
0 new messages