Looks good. This was my first thought for doing the calculation but I anticipated that there might a better dynamic way to do it, but now, I reckon, I have to continue treating the function as a layer as suggested.
I am, still, in a doubt and would love to ask you if there is a mathematical/conceptual way to do this (quoted) or we just have to calculate the output size layer by layer?



 aponcedeleonch:

function that tells you automatically what would be the last shape of the last layer or of a sequence of convolutional layers


And yes, thanks for the suggestion.