# How to map ground truth to prediction for UNet architecture

I've gone through the paper describing the UNet convolutional neural network a number of times, but am still having trouble figuring out how to connect the output of the network to the ground truth targets. Below is an image depicting the architecture of the network.

(source: uni-freiburg.de)

As can be seen from the figure, the output is a 388 x 388 x k matrix (where k is the number of classes). The target segmentation in this case should be 572 x 572 (same spatial dimensions as the input image). How do we match these up? Are we suppose to perform some kind of interpolation on the output feature map to get it to match the dimensionality of the input?

• Hi, did you find any solution to this problem? One way is to use padding in the conv layers, apart from this, is there any other way? like extracting patches from the mask of the same shape as that of the output of the model or something? – Rishabh Agrahari Mar 22 '18 at 17:04