eth-sri / eran

ETH Robustness Analyzer for Deep Neural Networks
Apache License 2.0
323 stars 103 forks source link

Model file not found #115

Closed anahitabn94 closed 2 years ago

anahitabn94 commented 2 years ago

Hi,

I tried to run "python3 . --netname ../nets/onnx/mnist/convBigDiffAI.onnx --epsilon 0.1 --domain deepzono --dataset mnist", but I got this error: "AssertionError: Model file not found. Please check "../nets/onnx/mnist/convBigDiffAI.onnx" is correct."

And I cannot also fine "convBig__DiffAI.onnx" in "ERAN/nets/onnx/mnist/". Could you please help me?

Melcfrn commented 2 years ago

Hello @anahitabn94, you can find models at the end of the README. Here : https://github.com/eth-sri/eran#neural-networks-and-datasets Then, put models you need in the folder you specify in option.

anahitabn94 commented 2 years ago

Thanks a lot.

I also have another problem with ERAN. I have a convolutional neural network created using Keras; then, I converted the model to an ONNX format using keras2onnx, as ERAN accepts networks with ONNX format. A layer named "transpose" is generated while the network format changes to ONNX. As ERAN cannot recognize this layer, I cannot run ERAN with my own CNN. Could you please help me with this? Is there any other way to convert a network to avoid having transpose layers?

mnmueller commented 2 years ago

Hello @anahitabn94, potentially this is due to keras using the nhwc instead of the nchw convention for dimension ordering. I would suggest converting the network to e.g. pytorch and exporting it from there to obtain a compatible onnx file. Cheers, Mark