Neural Network Visualization

netron model visulization

  1. pip install netron
  2. view model online: Netron
1
2
3
4
5
6
7
8
9
import netron
import torch

model = resnet18()
x = torch.randn(16, 3, 40, 40)
modelData = "./demo.pth"
torch.onnx.export(model, x, modelData)
netron.start(modelData)

or

1
2
3
4
import netron

modelData = "./demo.pth"
netron.start(modelData)

or

just upload the model .pth to web.