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

Empty Sets in output of MaxPooling2DLayer #234

Closed
m-usama-z opened this issue Aug 5, 2024 · 3 comments
Closed

Empty Sets in output of MaxPooling2DLayer #234

m-usama-z opened this issue Aug 5, 2024 · 3 comments

Comments

@m-usama-z
Copy link

m-usama-z commented Aug 5, 2024

Hi. It appears that, perhaps due to numerical imprecisions, it is possible for the MaxPooling2DLayer to output some empty ImageStars in the exact mode (some output sets are fine, some are empty). They were detected when gurobi resulted in infeasiblity while attempting to get lower and upper bounds in a subsequent MaxPooling2DLayer. It seems appropriate to check sets for emptiness after reachability analysis of this layer and avoid storing the empty sets. Interestingly, glpk still considered the infeasible problem of obtaining bounds feasible and solved it, so this issue actually went undetected until gurobi was used :)

@m-usama-z
Copy link
Author

m-usama-z commented Aug 5, 2024

Actually, it seems that the problem is resolved by using gurobi instead of linprog and passing lp_solver in the following line in the function reach_star_exact in MaxPooling2DLayer.m:

images = obj.stepSplitMultipleInputs(images, pad_image, split_pos(i, :, :), max_index{split_pos(i, 1), split_pos(i, 2), split_pos(i, 3)}, [], lp_solver);

Currently, lp_solver is not being passed here. With this change, there seems to be no need to check for empty sets.

@m-usama-z
Copy link
Author

m-usama-z commented Aug 5, 2024

Although, there can still be some issues (potentially somewhere else than MaxPooling2DLayer) which were resolved when I set gurobi's tolerances to the minimum possible, as follows:

        params.OptimalityTol = 1e-09;
        params.FeasibilityTol = 1e-09;

@mldiego
Copy link
Collaborator

mldiego commented Aug 20, 2024

Thanks for catching this one as well! The commit 6e0ff35 has fixed this issue.

@mldiego mldiego closed this as completed Aug 20, 2024
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