actually, my task is to build a model able to predict the borders of images.
so I started with cropping the borders(with fixed random int between 5,15) and keep them as targets (I resized all images before the cropping to 90*90)
and I extract also a mask of the same size with zeroes on the borders.
then I build collate fun. to stack the batches and passed the cropped image, masks (their shape will be [batch_size, 1, 90,90] and the targets [batch_size, max_tar_len in batch]
finally, I pass the cropped images and I got the output with the same shape then I multiply this output
by the masks then I extract the number != 1 when I loop over each batch to compare the shapes (target, output) I found there’re different as I mentioned in the last comment.