Browse Source

pnnx rename _export() to export() (#5831)

tags/20241226
張小凡 GitHub 1 year ago
parent
commit
24908b7c87
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      tools/pnnx/src/ir.cpp

+ 3
- 3
tools/pnnx/src/ir.cpp View File

@@ -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++)
{


Loading…
Cancel
Save