Is it possible to show the computational graph in graphviz?

I want to study the detailed layers of the encoder and the decoder. I have tried to use graph.dot to draw the model _G.model.models.encoder with graphviz. I stoped the program before it begin to backward. But I failed since the model have no detailed tensor size. The command I use to draw is
graph.dot(model.models.encoder:get(1).fg, 'Forward Graph', 'forward')
and the graph I got is


How can I get tensor size in this graph?

I don’t think you can with the nngraph library. The graph does not know about tensors. It just statically describes the network.