1.1 + 1.2 的使用方法如下:PyTorch下的可视化工具 - 知乎
1.3的使用方法:使用pytorchviz和Netron可视化pytorch网络结构_-牧野-的博客-CSDN博客_netron pytorch
有一个问题就是:
解决 HiddenLayer 可视化不显示神经网络数据流维度大小?
找到 pytorch_builder.py 文件,修改 get_shape(torch_node) 函数如下:
* 找到 pytorch_builder.py 文件的方法是:直接在文件夹中打开“build_graph”文件,然后文件夹内就有pytorch_builder.py
def get_shape(torch_node):
"""Return the output shape of the given Pytorch node."""
# Extract node output shape from the node string representation
# This is a hack because there doesn't seem to be an official way to do it.
# See my quesiton in the PyTorch forum:
# https://discuss.pytorch.org/t/node-output-shape-from-trace-graph/24351/2
# TODO: find a better way to extract output shape
# TODO: Assuming the node has one output. Update if we encounter a multi-output node.
shape = torch_node.output().type().sizes()
return shape
二、训练过程可视化 2.1 通过tensorboardX可视化训练过程
【Pytorch】tensorboardX==》数据可视化_马鹏森的博客-CSDN博客
三、使用Visdom进行可视化PyTorch下的可视化工具 - 知乎



