How to efficiently subsample from large images

You won’t be able to create the same input shape using the specified shapes, as the input shape of 500 divided by the kernel size of 160 will have a remainder.
If that’s important, have a look at this code, which adds padding to the input.