First, how can deal with the margin problem when I using unfold function for many times to extract 3d patches, because I found that some of pixels in margin will be ignored when the patch size can not be exactly divided.
Second, in the test set, how can I recover the original Image size after predict label through networks?