# Modifying network to handle images consistently

I'm modifying IRNet to work with the Cityscapes dataset. This network takes images as input and is supposed to output images that can be used as instance segmentation labels.

IRNet originally uses the VOC12 dataset, where most images are 375x500 pixels. For those images the network outputs a tensor with the shape 94x125, so each dimension is reduced by a factor of four. However, for the Cityscapes images, which are all 1024x2048 pixels, the network outputs a tensor with shape 128x128. The subsequent code then fails, because it expects the shape to be 256x512.

I'm trying to understand why the network appears to behave differently with larger images and where I need to make changes so the output shape becomes correct.

Edit: I have since been able to narrow down the issue. In line 229 of the net code there is the line dp_out = dp_out[..., :feat_size[0], :feat_size[1]]. dp_out has size 128x128 at this point and feat_sizeis the size of the original feature. So if the the original feature is larger than 128x128, dp_out isn't changed at all.

Do I understand that line correctly in that it simply crops dp_out to the desired size? How does that not screw up the results?