-
Notifications
You must be signed in to change notification settings - Fork 54
Description
Hi, would it be possible to create an example for ASpanFormer model, a loftr like model, that is mostly using the same code as loftr.
I tried to implement it using your loftr example, but first, got an error from onnx saying that the opset 12 doesn't support grid_sampler. error below:
Exception has occurred: UnsupportedOperatorError Exporting the operator 'aten::grid_sampler' to ONNX opset version 12 is not supported. Support for this operator was added in version 16, try exporting with this version. File "convert_to_onnx_aspan.py", line 35, in main torch.onnx.export( File "convert_to_onnx_aspan.py", line 70, in <module> main()
After setting the opset version to 16, the code successfully exported the onnx model, but when calling the inferenceSession as sess = onnxruntime.InferenceSession("aspanformer.onnx")
got another error saying:
Exception has occurred: InvalidGraph [ONNXRuntimeError] : 10 : INVALID_GRAPH : Load model from aspanformer.onnx failed:This is an invalid model. Type Error: Type 'tensor(bool)' of input parameter (/coarse_matching/And_1_output_0) of operator (ReduceMax) in node (/coarse_matching/ReduceMax_2) is invalid.
The exported model even passes the onnx.checker.check_model validation.
Any help would be great, and thanks for the good work.