Scripting a model via torch.jit.script
will try to optimize it by analyzing and processing the computation graph (e.g. on the GPU operations could be fused as seen here. Scripting is not used to return additional (intermediate) outputs from the model.