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

Add simulation for preprocess. #439

Merged
merged 11 commits into from
Mar 16, 2021

Conversation

tagomaru
Copy link
Contributor

@tagomaru tagomaru commented Mar 2, 2021

This PR is going to add simulation function to enhance preprocess.

tagomaru added 2 commits March 2, 2021 10:18
Signed-off-by: tagomaru <tagomaru@users.noreply.github.com>
Signed-off-by: tagomaru <tagomaru@users.noreply.github.com>
@tagomaru tagomaru requested a review from wu-haoze March 2, 2021 18:51
tagomaru added 3 commits March 4, 2021 14:36
Signed-off-by: tagomaru <tagomaru@users.noreply.github.com>
Signed-off-by: tagomaru <tagomaru@users.noreply.github.com>
Signed-off-by: tagomaru <tagomaru@users.noreply.github.com>
src/engine/Engine.cpp Outdated Show resolved Hide resolved
src/engine/Engine.cpp Outdated Show resolved Hide resolved
src/engine/Engine.cpp Show resolved Hide resolved
src/nlr/LPFormulator.cpp Outdated Show resolved Hide resolved
Signed-off-by: tagomaru <tagomaru@users.noreply.github.com>
tagomaru added 4 commits March 9, 2021 14:49
Signed-off-by: tagomaru <tagomaru@users.noreply.github.com>
Signed-off-by: tagomaru <tagomaru@users.noreply.github.com>
Signed-off-by: tagomaru <tagomaru@users.noreply.github.com>
@@ -32,6 +35,7 @@ class LayerOwner
virtual const ITableau *getTableau() const = 0;
virtual unsigned getNumberOfLayers() const = 0;
virtual void receiveTighterBound( Tightening tightening ) = 0;
virtual void simulate( Vector<Vector<double>> *input ) = 0;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since simulate() is now called only in Engine.cpp, which stores nlr as a NetworkLevelReasoner instead of a LayerOwner, we probably don't need to add this method in the LayerOwner class.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done.

@@ -17,6 +17,9 @@
#define __LayerOwner_h__

#include "Tightening.h"
#include "Vector.h"

// #include <vector>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this line?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done.

@@ -58,6 +58,7 @@ void Options::initializeDefaultValues()
_intOptions[VERBOSITY] = 2;
_intOptions[TIMEOUT] = 0;
_intOptions[CONSTRAINT_VIOLATION_THRESHOLD] = 20;
_intOptions[NUMBER_OF_SIMULATIONS] = 10;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe set this to 1 for now? We can submit another PR after evaluating what is the best number of simulations.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done.

Signed-off-by: tagomaru <tagomaru@users.noreply.github.com>
@wu-haoze wu-haoze merged commit f3b4ae8 into NeuralNetworkVerification:master Mar 16, 2021
matanost pushed a commit that referenced this pull request Nov 2, 2021
* Add simulation for preprocess

Signed-off-by: tagomaru <tagomaru@users.noreply.github.com>

* fix compile error

Signed-off-by: tagomaru <tagomaru@users.noreply.github.com>

* small change

Signed-off-by: tagomaru <tagomaru@users.noreply.github.com>

* small change 2

Signed-off-by: tagomaru <tagomaru@users.noreply.github.com>

* change ci

Signed-off-by: tagomaru <tagomaru@users.noreply.github.com>

* std::vector to Vector, and etc

Signed-off-by: tagomaru <tagomaru@users.noreply.github.com>

* change log

Signed-off-by: tagomaru <tagomaru@users.noreply.github.com>

* Fix system test apart from AbsoluteValue

Signed-off-by: tagomaru <tagomaru@users.noreply.github.com>

* fix minor issues

Signed-off-by: tagomaru <tagomaru@users.noreply.github.com>
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

Successfully merging this pull request may close these issues.

2 participants