Tensorboard graph failing to nest modules

username: florobax
cooked: <p>Hi !</p>
<p>I’ve been running over this problem for the first time a few days ago and I have been unable since then to find a fix, so here I am. I am a big fan of tensorboard’s graph visualization tool, as it helps a great deal when it comes to understanding what happens in a model. I have been successfully using it for months now, but it recently tarted behaving strangely (probably since 1.2 where torch.utils.tensorboard._pytorch_graph.graph was significantly modified). My problem is that it longer nests modules inside one another. It just creates a big module, and inside are all the leaf modules directly, which is quite difficult to understand. See below for an example.<br>
<img src="https://discuss.pytorch.org/uploads/default/original/3X/3/5/35c8124b345ee77a1cfda79460554cab38974b3c.png" alt="Screenshot_2019-12-04%20TensorBoard" data-base62-sha1="7FLXkWc6d7OXHJEjBCRafFdhR6c" width="214" height="328"><br>
<div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/8/f/8fb092031454c251318a6c14489ef65c1f9a14b9.png" data-download-href="https://discuss.pytorch.org/uploads/default/8fb092031454c251318a6c14489ef65c1f9a14b9" title="Screenshot_2019-12-04%20TensorBoard(1)"><img src="https://discuss.pytorch.org/uploads/default/original/3X/8/f/8fb092031454c251318a6c14489ef65c1f9a14b9.png" alt="Screenshot_2019-12-04%20TensorBoard(1)" data-base62-sha1="kv8zRQDAr4KItjmEmMB4CIkPhUZ" width="690" height="334" data-dominant-color="EFEAEA"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">Screenshot_2019-12-04%20TensorBoard(1)</span><span class="informations">758×368 16.8 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div><br>
Is there any way to come back to the old behavior with the new code structure ? Because this way of having things displayed is not very handy to use to be honest, and I can’t find a way to make it work.</p>

username: albanD
cooked: <p>Hi,</p>
<p>That does not look right indeed.<br>
If you have a specific model that used to work and does not anymore, you can open a bug issue with the specific model and what you used to get and what you get now on github for this regression to be fixed !</p>

username: florobax
cooked: <p>Problem is I don’t have a screenshot of the version that worked for me. I could try to reproduce it with a previous version of pytorch though. The model I am using here is torchvision’s resnet34.</p>

username: florobax
cooked: <p>Ok managed to get an old version (had to fight for it, incompatibility issues everywhere). It looked like that:<br>
<div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/1/b/1bed23b6ab6ae5381494cd51382ab15fc85e05f3.png" data-download-href="https://discuss.pytorch.org/uploads/default/1bed23b6ab6ae5381494cd51382ab15fc85e05f3" title="Screenshot_2019-12-05%20TensorBoard"><img src="https://discuss.pytorch.org/uploads/default/optimized/3X/1/b/1bed23b6ab6ae5381494cd51382ab15fc85e05f3_2_222x500.png" alt="Screenshot_2019-12-05%20TensorBoard" data-base62-sha1="3Z2Xz7MUsMApl1NFGRQLeKM3zhx" width="222" height="500" srcset="https://discuss.pytorch.org/uploads/default/optimized/3X/1/b/1bed23b6ab6ae5381494cd51382ab15fc85e05f3_2_222x500.png, https://discuss.pytorch.org/uploads/default/original/3X/1/b/1bed23b6ab6ae5381494cd51382ab15fc85e05f3.png 1.5x, https://discuss.pytorch.org/uploads/default/original/3X/1/b/1bed23b6ab6ae5381494cd51382ab15fc85e05f3.png 2x" data-dominant-color="EDEDED"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">Screenshot_2019-12-05%20TensorBoard</span><span class="informations">327×735 17.9 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div><br>
I’ll create an issue I guess.</p>

username: albanD
cooked: <p>Great ! Thanks for taking the time to get this.</p>