Solved by Julien_Guegan in post #12 
              
              
                The solution of the question is about the architecture. For segmentation task, I was using an encoder/decoder architecture (Unet). And indeed the input size had to be a multiple of 32 due to multiple undersampling, oversampling and copy feature. It might be possible to solve this problem by adapting…