Utility function for calculating the shape of a conv output

Lazy modules are implemented as described in your other post.