Haider_Ali_Shuvo:

How does it keep spatial dimention same yet ?


A FCN model doesn’t necessarily keep the spatial dimensions the same, but uses conv layers instead of linear layers to be able to accept variable input shapes.
This can also be done using adaptive pooling layers.
Usually the last linear layers are replaced with a 1x1 conv layer (and potentially a global pooling layer to get the number of classes as the output).