Tencent/ncnn ? reverse-engineered prompt

Reverse engineered prompt

Build me a simple working demo around ncnn that can take a small PyTorch model, convert it with pnnx, and run inference from a tiny C++ app. I want the project to load the exported model files, run a sample input, and print the output so I can see the whole flow end to end.

Please make it easy to build on my machine, and include a clear example I can run right away. If Vulkan support is available, wire it in so it can use the GPU when possible, but keep a CPU fallback too. I’d also like a small Python example if that’s straightforward, so I can test the model before using the C++ version.

Keep it clean and beginner friendly, with brief setup steps and a sample model or toy network included. If you need to look up the current build or export instructions online, go ahead and do that.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab