From 24908b7c87fbd51fc55c0a4497a96419fca82c97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=B5=E5=B0=8F=E5=87=A1?= <2672931+whyb@users.noreply.github.com> Date: Thu, 19 Dec 2024 16:00:35 +0800 Subject: [PATCH] pnnx rename _export() to export() (#5831) --- tools/pnnx/src/ir.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/pnnx/src/ir.cpp b/tools/pnnx/src/ir.cpp index 59ad3e89f..5fcf9916f 100644 --- a/tools/pnnx/src/ir.cpp +++ b/tools/pnnx/src/ir.cpp @@ -2502,15 +2502,15 @@ int Graph::python(const std::string& pypath, const std::string& pnnxbinpath) fprintf(pyfp, "\n"); - // torch.onnx._export(net, v_0, "test_swin_t.onnx", export_params=True, opset_version=14, input_names=['in0'], output_names=['out0']) + // torch.onnx.export(net, v_0, "test_swin_t.onnx", export_params=True, opset_version=14, input_names=['in0'], output_names=['out0']) if (input_names.size() == 1) { - fprintf(pyfp, " torch.onnx._export(net, %s", input_names[0].c_str()); + fprintf(pyfp, " torch.onnx.export(net, %s", input_names[0].c_str()); } else { - fprintf(pyfp, " torch.onnx._export(net, ("); + fprintf(pyfp, " torch.onnx.export(net, ("); for (size_t i = 0; i < input_names.size(); i++) {