This is not done by the network because the conv layers don’t have information what input shapes you will run through them.
The usual thing I do (and I think I might not be the only one) is just to run some data through it and print the shape of the result (or just take the error and adjust based on that).
Best regards
Thomas