Skip to content

Commit

Permalink
pnnx rename _export() to export() (#5831)
Browse files Browse the repository at this point in the history
  • Loading branch information
whyb authored Dec 19, 2024
1 parent 57fac4a commit 24908b7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tools/pnnx/src/ir.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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++)
{
Expand Down

0 comments on commit 24908b7

Please sign in to comment.