Well, usually when building a model you have an idea of the intermediate shapes of the model (e.g., after each forward operation). From there you can decide whether the shape produced by the model needs to be fixed or the expected output shape should be something else.