pnnx python wrapper
Project description
pnnx_package
pnnx python wrapper
How to use
pip install pnnx
example
import pnnx
import torch
import torchvision
def test_pnnx_export():
resnet_test_model = torchvision.models.resnet18()
x = torch.rand(1, 3, 224, 224)
pnnx.export(resnet_test_model, x)
if __name__ == "__main__":
test_pnnx_export()
You should combine inputs use tuple, e.g. inputshape, moduleop... Here is a more complex example:
pnnx.export(your_model, inputshape=(x,y), inputshape2=(x2,y2), optlevel=0, pnnxparam="model.pnnx.param", device= "gpu", moduleop =("models.common.Focus","models.yolo.Detect"))
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pnnx-0.0.4.tar.gz
(49.0 MB
view hashes)
Built Distribution
pnnx-0.0.4-py3-none-any.whl
(49.4 MB
view hashes)