Get intermediate outputs from torchscript graph

Is it possible to get the values of intermediate ops in the torchscript graph? Or is the only way to modify the source model to keep intermediate outputs in the actual output (or something like this)?

1 Like