Hi @Linux-cpp-lisp,
This is a great question and one that’s come up several times. The long-and-short of it is that providing this sort of symbolic shape functionality is quite difficult, since it involves writing code or symbolic formulae to calculate the shapes for every op/module you might see in the program. We currently don’t have such formulae for general usage in PyTorch, though we might sometime in the future.
If, however, your transformation can make a simplifying assumption, it may be more tractable to implement for your use case. For example, if your transform only operates on a small set of operators or modules, it may be tenable to implement the formulas for just those ops/modules.
Please let me know if that works for your situation, otherwise we can register this need with the team to better motivate the general shape analysis problem.
James