> But we don't know the dimensions of transform's output in advance,

Ah, good point. I need coffee.