torch.jit.trace create a graph, graph.inputs() return input nodes in net.forward and parameter nodes, the problem is there is no way to get corresponding weight tensor for a parameter node.
I currently use this code 45 to get weight tensor to parameter node mapping, but this isn’t guaranteed by pytorch doc.