0
我正在开发CNN做生物医学图像的分割。使用图像作为CNN中的标签与Caffe
作为一个输入,我有572x572x3的图像,我的标签是与地面真相的图像。
这是我的数据层:
layer {top: 'image' name: 'loadMydata_image' type: 'HDF5Data' hdf5_data_param { source: '/home/alexandra/Documents/my-u-net/my_data.txt' batch_size: 1} include: { phase: TRAIN }}
layer {top: 'anno' name: 'loadMydata_anno' type: "HDF5Data" hdf5_data_param { source: '/home/alexandra/Documents/my-u-net/my_data.txt' batch_size: 1} include: { phase: TRAIN }}
的问题是,在端部我的输出大于标签图像和欧几里德损耗层不能工作小。 这里是我的最后一层:
layer { name: 'label_reshape' type: 'Reshape' bottom: 'anno' top: 'anno_reshaped' reshape_param { shape : {dim:0 dim:-1 dim:0 dim:0} }}
layer { bottom: 'score' bottom: 'anno_reshaped' top: 'loss' name: 'loss_tune' type: "EuclideanLoss" include: { phase: TRAIN }}
我有这样的错误:
F0722 10:43:42.478071 10809 euclidean_loss_layer.cpp:12] Check failed: bottom[0]->count(1) == bottom[1]->count(1) (980000 vs. 981552) Inputs must have the same dimension.
我试图用重塑层,但我无法得到确切大小相同..
没有人有一个想法如何解决这个问题?
好的,谢谢。我会尝试裁剪我的标签。 –