fsasf1312:

What is the best way to achieve only the part of graph being computed which is needed in the output?


The best (and probably only way) would be to use conditions, since the computation graph is created dynamically during the forward pass.
What’s the reason you don’t want to use conditions?