torchviz is more or less the official way to do it 
The main drawback is that it is very hard to read from a user point of view in general.
Note that the tensorboard implementation has a nice tool to visualize graphs at the torch.nn level as well