eth-sri / eran

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

For ERAN elina_abstract0_from_zonotope is not defined #10

Closed antoniobruto closed 5 years ago

antoniobruto commented 5 years ago

Dear Gagandeep,

I have also installed everything without any errors (including the latest clone of ELINA). However, when using zonotopes, I see the same issue that was pointed out by Nikos, i.e. that the method elina_abstract0_from_zonotope is not present in libzonoml.so

Even tried doing as you suggested by re "making" the library from scratch but this did not add the method either.

Any alternate suggestions or discussions would be most appreciated. The traceback is included below:

Traceback (most recent call last): File "/usr/lib/python3.5/runpy.py", line 184, in _run_module_as_main "main", mod_spec) File "/usr/lib/python3.5/runpy.py", line 85, in _run_code exec(code, run_globals) File "./main.py", line 295, in perturbed_label, nn, nlb, nub = eran.analyze_zonotope(zonotope, domain, args.timeout_lp, args.timeout_milp, args.use_area_heuristic) File "./eran.py", line 111, in analyze_zonotope dominant_class, nlb, nub = analyzer.analyze() File "./analyzer.py", line 100, in analyze element, nlb, nub = self.get_abstract0() File "./analyzer.py", line 80, in get_abstract0 element = self.ir_list[0].transformer(self.man) File "./deepzono_nodes.py", line 259, in transformer element = elina_abstract0_from_zonotope(man, 0, zonotope_shape[0], self.num_error_terms, self.zonotope) File "../ELINA/python_interface/zonoml.py", line 126, in elina_abstract0_from_zonotope return res UnboundLocalError: local variable 'res' referenced before assignment

We seem to see that the method elina_abstract0_from_zonotope in zonoml.h is undefined in the project. We also see that the associated mapping in the python interface seems to be missing.

Can you verify this? Or could you point us to a version which has these definitions? We see this in a version of ELINA that we cloned today.

We were wondering if the zonoml_reduced_product.c was supposed to contain the implementation, but maybe this was missed during the latest merge.

This is important to our work, so I'm trying to debug it too. Any help would be appreciated :-)

I wasn't sure if this should be put in the closed thread or I should create a new one. So I've put it in both places.

GgnDpSngh commented 5 years ago

Hi Antonio,

I have added the missing function to ELINA. Update it on your machine and it should work.

Cheers, Gagandeep Singh

antoniobruto commented 5 years ago

Dear Gagandeep,

Thanks for responding on this issue. We updated ELINA and are able to see the function now. We'll test it with our flow.

Regards, Antonio