Closed cherrywoods closed 3 years ago
Hello @cherrywoods,
Thanks for your interest in ERAN and providing these interesting test cases.
I have homogenized how the networks with different input dimensions are treated when using the recursive refinement of input regions in the parallel mode ACAS Xu verification, which now leads to consistently fast (about 2.5s for me) falsification of the two networks/properties.
I also updated our translation of MatMul nodes to handle the special case occurring for the no_batch network and now it behaves consistently with the other two.
Cheers, Mark
Hello Mark, excellent, thank you very much!
Best regards, David
Dear ERAN Developers, I have recently encountered some errors and behaviour I can not explain related to different ONNX exports of the same pytorch network. The network is the the ACAS Xu 2,1 network and the different ONNX variants were created like this:
torch.onnx.export(net, (torch.zeros((1, 5), ))
[Export with Batch dimension]torch.onnx.export(net, (torch.zeros((5, ), ))
[Export without a batch dimension]torch.onnx.export(net, (torch.zeros((5, ), ))
. [With unsqueeze]What I am encountering is that the network with the Batch dimension and the one with the unsqueeze operation have widely differing runtimes. The call of
takes 176 seconds on my machine to find a property violation. The call of however
takes only 13 seconds to find a property violation.
The call
crashes with a segmentation fault.
All three were exported with pytorch (latest version, 1.8.0), so I think it would be nice if all three would work fine, but I am mostly wondering about the runtime difference for the networks that only differ in the batch dimension and one additional operation that is as far as I could see simply ignored by the onnx translator.
I am attaching the networks I used and will add a printed version of the models below as well. The structure of the network without a batch dimension (no unsqueeze) is simply a bit weird. I think it is only possible at all to run networks with inputs without a batch dimension with the latest pytorch (1.8.0), so maybe this onnx export has not yet really been considered. I used a later version of onnx and onnxruntime than given in the requirements.txt file, because 1.5.0 does not support the ONNX opset version that pytorch uses by default. I have the latest versions of ERAN, ELINA and the other dependencies.
Kind regards, David
The networks I used: onnx_networks.zip
The networks as printed by the ONNX runtime (and the ACAS Xu 2,1 network from ERAN for comparison)
The package versions I used:
Tensorflow is on such a low version, because I encountered an error with the latest one. A am also attaching a requirements.txt file for all the installed packages.