Referring to this:
https://pytorch.org/docs/master/jit.html#creating-torch-script-code 8

“It [ScriptModule] is an analogue of torch’s nn.Module and represents an entire model as a tree of submodules.”

How does a ScriptModule object get serialized using the ScriptModule.save() method? Is it still an NN graph but with special conditional nodes? Or is it more of a code AST and the graph-level abstraction is lost?
Based on the following question on the PyTorch discussion forum, tracing seems to just export to ONNX format:

  
    
    
    How to use torch.jit for graph trace? 
  
  
    Hi all, 
I try to trace myself graph using torch.jit but i have next problem: 

Create simple model


class SimpleNet(nn.Module):
    def __init__(self):
        super().__init__()
        self.conv1 = nn.Conv2d(3, 10, kernel_size=1)
    def forward(self, x):
        x = self.conv1(x)
        return x



Create variable and trace model:


net = SimpleNet()
var = Variable(torch.randn(1, 3, 224, 224))
trace, out = jit.trace(net, var)
trace.export(list(net.state_dict().values()))


And I get next o…