我正在尝试在我的数据上运行 UNet,这是分辨率为 256x256 的灰度图像。UNet 将图像下采样为 1×5×84×84(5 是类数)。我收到以下错误:
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)
有人可以让我知道我应该如何设置填充值以获得输出预测中的准确输入大小吗?我不知道应该如何更改以及更改哪些图层。