I am trying to run UNet on my data, which is grayscale images with 256x256 resolution. UNet is downsampling the image to 1-by-5-by-84-by-84 (5 is number of classes). and I am getting the following error:
0501 02:16:17.345309 2433 net.cpp:400] loss -> loss
I0501 02:16:17.345317 2433 layer_factory.hpp:77] Creating layer loss
F0501 02:16:17.345377 2433 softmax_loss_layer.cpp:47] Check failed: outer_num_ * inner_num_ == bottom[1]->count() (7056 vs. 65536) Number of labels must match number of predictions; e.g., if softmax axis == 1 and prediction shape is (N, C, H, W), label count (number of labels) must be N*H*W, with integer values in {0, 1, ..., C-1}.
*** Check failure stack trace: ***
@ 0x7f7d2c9575cd google::LogMessage::Fail()
@ 0x7f7d2c959433 google::LogMessage::SendToLog()
@ 0x7f7d2c95715b google::LogMessage::Flush()
@ 0x7f7d2c959e1e google::LogMessageFatal::~LogMessageFatal()
@ 0x7f7d2d02d4be caffe::SoftmaxWithLossLayer<>::Reshape()
@ 0x7f7d2d0c61df caffe::Net<>::Init()
@ 0x7f7d2d0c7a91 caffe::Net<>::Net()
@ 0x7f7d2d0e1a4a caffe::Solver<>::InitTrainNet()
@ 0x7f7d2d0e2db7 caffe::Solver<>::Init()
@ 0x7f7d2d0e315a caffe::Solver<>::Solver()
@ 0x7f7d2cf7b9f3 caffe::Creator_SGDSolver<>()
@ 0x40a6d8 train()
@ 0x4075a8 main
@ 0x7f7d2b40b830 __libc_start_main
@ 0x407d19 _start
@ (nil) (unknown)
Could someone please let me know how should I set the padding values to get the exactly the input size in the output prediction? I do not know how and which layers should I change.