Files
Lune bedf9c6568 unaryop: extend sign, hyperbolic, expm1 and log1p support (#6675)
Add backend support for new UnaryOp operations across scalar, SIMD and Vulkan paths, including sign, sinh, cosh, asinh, acosh, atanh, expm1 and log1p.

Wire the new ops through onnx2ncnn and pnnx expression conversion, update generated Python emission, and add regression coverage for the new conversion paths.

Fix portability issues for expm1/log1p math declarations, NCNN_SIMPLEMATH builds, ONNX-enabled pnnx linking, and stabilize unary op tests across fp16, bf16 and torch exporter/version differences.

Co-authored-by: nihui <nihuini@tencent.com>
2026-05-21 16:19:58 +08:00
..
2021-07-03 14:47:35 +08:00
2025-09-23 19:41:06 +08:00

onnx to ncnn Conversion Guide

This guide is for users who want to convert their onnx models to the ncnn format.

The onnx2ncnn tool is now considered legacy. We strongly recommend using pnnx for all model conversion tasks.

pnnx is the new-generation model converter that is actively developed and maintained. It offers a more robust and flexible solution for converting models from various deep learning frameworks into ncnn.

Quick Start: Basic Usage

Using pnnx to convert an onnx model is straightforward.

Install pnnx and run the conversion.

pip3 install pnnx

# Syntax: pnnx <onnx_model_path>
# Example:
pnnx my_model.onnx

After running the command, you will get my_model.ncnn.param and my_model.ncnn.bin, ready for use with ncnn.