Skip to content

Node id's including slashes cause "no such file or directory" error #125

Open
@robinvanemden

Description

@robinvanemden

When converting the included model with onnx-cpp it throws the following error:

reading onnx model from file  optimized.onnx
Model info:
  ir_vesion :  4
  doc       :
INFO (ONNX): writing model parameter const_fold_opt__17 to dir savedmodel/.
INFO (ONNX): writing model parameter StatefulPartitionedCall/sequential_1/dense_2/MatMul/ReadVariableOp:0 to dir savedmodel/.
Traceback (most recent call last):
  File "/home/robin/.local/bin/onnx-cpp", line 11, in <module>
    sys.exit(main())
  File "/home/robin/.local/lib/python3.6/site-packages/deepC/compiler/onnx2cpp.py", line 65, in main
    dcGraph = parser.main(onnx_file, bundle_dir, optimize=False, checker=False)
  File "/home/robin/.local/lib/python3.6/site-packages/deepC/compiler/read_onnx.py", line 486, in main
    self.addParams(param);
  File "/home/robin/.local/lib/python3.6/site-packages/deepC/compiler/read_onnx.py", line 194, in addParams
    self.writeParamsToFile(param.name, param_vals);
  File "/home/robin/.local/lib/python3.6/site-packages/deepC/compiler/read_onnx.py", line 56, in writeParamsToFile
    with open(paramFile, "w") as fp:
FileNotFoundError: [Errno 2] No such file or directory: 'savedmodel/StatefulPartitionedCall/sequential_1/dense_2/MatMul/ReadVariableOp:0'

I presume this is probably caused by the slashes in the node id's of the model?

slashes.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions