Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parsing dubinsrejoin.onnx (VNN-Comp 2022) #3

Closed
phK3 opened this issue Dec 21, 2022 · 3 comments
Closed

Parsing dubinsrejoin.onnx (VNN-Comp 2022) #3

phK3 opened this issue Dec 21, 2022 · 3 comments

Comments

@phK3
Copy link

phK3 commented Dec 21, 2022

When running VeriNet on the dubins_rejoin instances of VNN-Comp 2022 using
benchmark(result_path, benchmark_path, instances_csv_path, input_shape=(8,), transpose_fc_weights=False), I get the following error:

ValueError: Expected at least one connection to non-input node: VeriNetNNNode(idx: 1, op: Linear(in_features=256, out_features=8, bias=True), to: [2], from: [])

The error gets thrown at VeriNet/verinet/sip_torch/sip.py, line 337, in _process_node.

Parsing for other networks works fine.

Thanks in advance for your help.

@pat676
Copy link
Collaborator

pat676 commented Dec 22, 2022

Hi,

The ONNXParser uses strings to identify the input nodes. It provides some default input names which cover most cases; however, dubinsrejoin.onnx seems to have a non-standard name.

There are a few solutions for automatically inferring input nodes from the ONNX model. However, we do not actively maintain this repo anymore besides small bug fixes; thus a fix will most likely not be implemented in the near future.

My proposed solution is to change line 69 of benchmark.py from

model_onnx = ONNXParser(model_path)

to:

model_onnx = ONNXParser(model_path, input_names= ["dense_input"], transpose_matmul_weights=True)

Note that I also added "transpose_matmul_weights=True" which I believe is necessary for this benchmark.

Hope this helps!

@phK3
Copy link
Author

phK3 commented Dec 22, 2022

It worked, when I changed line 74 in benchmark_vnnlib.py to

ONNXParser(model_path, input_names=["dense_input"], transpose_fc_weights=True)

(using transpose_fc_weights) if the model_path contains dubinsrejoin.

Thanks for your help!

@pat676
Copy link
Collaborator

pat676 commented Dec 22, 2022

Great! I'm closing this issue then

@pat676 pat676 closed this as completed Dec 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants