Skip to content

Commit

Permalink
完成区间算术 + milp。
Browse files Browse the repository at this point in the history
  • Loading branch information
l-outsider committed Dec 30, 2020
1 parent 85c4625 commit f1d0718
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 12 deletions.
21 changes: 18 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,23 @@
# FFNN-Verify
一个全连接ReLU节点的前馈神经网络的形式化验证器
一个全连接ReLU节点的前馈神经网络的形式化验证器。使用了区间传播 + 混合整形线性规划两种方法进行神经网络验证。

- [FFNN-Verify](#ffnn-verify)
- [1.1. dependence:](#11-dependence)
- [1.2. example:](#12-example)

---

dependence:
## 1.1. dependence:
- numpy
- mip
- gurobi
- keras


## 1.2. example:
本项目以ACAS XU为例,检查了属性3在网络1_1到1_9下的验证结果。

```
python main.py --npath /Acas/acas_1_1.h5 --type rea --prop 3
```

如果要验证其他属性,请自行编写输出约束的反例。
5 changes: 1 addition & 4 deletions src/Layer.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
from numpy import ndarray
import numpy as np
class L:
def __init__(self):
pass
from numpy import ndarray


class Layer:
Expand Down
6 changes: 3 additions & 3 deletions src/networkClass.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import numpy as np
from keras.models import load_model
import keras
import numpy as np
from Layer import Layer
from property import getNormaliseInput
from typing import List
from numpy import ndarray
from keras.models import load_model
from property import getNormaliseInput


class Network:
Expand Down
4 changes: 2 additions & 2 deletions src/solverClass.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from networkClass import Network
import numpy as np
import gurobipy as gp
from gurobipy import GRB
from Layer import Layer
from typing import List
from gurobipy import GRB
from networkClass import Network

class Solver:
def __init__(self, network: Network, propertyFile: str):
Expand Down

0 comments on commit f1d0718

Please sign in to comment.