I’m trying to traverse a graph that I got from tracing the model. I got most of the data I need, except for one: the shape of the output of each layer.
# VGG16
model = torchvision.models.vgg16()
# Get trace graph
trace, out = torch.jit.get_trace_graph(model, torch.zeros([1, 3, 224, 224]))
torch.onnx._optimize_trace(trace, torch.onnx.OperatorExportTypes.ONNX)
graph = trace.graph()
# Print first node in the graph
node = list(graph.nodes())[0]
print(node)

Output:
%33 : Float(1, 64, 224, 224) = onnx::Conv[dilations=[1, 1], group=1, 
kernel_shape=[3, 3], pads=[1, 1, 1, 1], strides=[1, 1]](%0, %1, %2), 
scope: VGG/Sequential[features]/Conv2d[0]

See the Float(1, 64, 224, 224) in the output? That’s the value I want. Which method or property returns that?