From d355b6dc5bf6daf2fcd00caa24875f6f3fcb862e Mon Sep 17 00:00:00 2001 From: lll143653 <58139948+lll143653@users.noreply.github.com> Date: Tue, 23 Jul 2024 16:54:35 +0800 Subject: [PATCH] Add warning and recommend to use pnnx (#5588) --- tools/onnx/onnx2ncnn.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tools/onnx/onnx2ncnn.cpp b/tools/onnx/onnx2ncnn.cpp index e443a28ed..1b29e34c1 100644 --- a/tools/onnx/onnx2ncnn.cpp +++ b/tools/onnx/onnx2ncnn.cpp @@ -2956,6 +2956,15 @@ static std::string trunc_name(std::string name) int main(int argc, char** argv) { + fprintf(stderr, "onnx2ncnn may not fully meet your needs. For more accurate and elegant\n\ +conversion results, please use PNNX. PyTorch Neural Network eXchange (PNNX) is\n\ +an open standard for PyTorch model interoperability. PNNX provides an open model\n\ +format for PyTorch. It defines computation graph as well as high level operators\n\ +strictly matches PyTorch. You can obtain pnnx through the following ways:\n\ +1. Install via python\n\ + pip3 install pnnx\n\ +2. Get the executable from https://github.com/pnnx/pnnx\n\ +For more information, please refer to https://github.com/pnnx/pnnx\n"); if (!(argc == 2 || argc == 4)) { fprintf(stderr, "Usage: %s [onnxpb] [ncnnparam] [ncnnbin]\n", argv[0]);