ncnn icon indicating copy to clipboard operation
ncnn copied to clipboard

promote pnnx dynamo exported program support

Open nihui opened this issue 4 months ago • 0 comments

https://docs.pytorch.org/docs/stable/export.html

import torch
import torchvision.models as models

net = models.resnet18()
net.eval()

torch.manual_seed(0)
x = torch.rand(1, 3, 224, 224)

a = net(x)

# export pt2
program = torch.export.export(net, (x,))
torch.export.save(program, 'test_resnet18.pt2')
  • [ ] ./pnnx test_resnet18.pt2 (parsing and populate pnnx graph)
  • [ ] generate export_exported_program() in xxx_pnnx.py
  • [ ] add operator tests for exported program

nihui avatar Oct 22 '25 09:10 nihui