Skip to content

Commit

Permalink
DeepPoly ReLU, FullyConnected, and Conv2d
Browse files Browse the repository at this point in the history
  • Loading branch information
MekAkUActOR committed Nov 25, 2022
1 parent 87f5c8e commit 2b02834
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion code/evaluate
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

rm $1/res.txt
for net in {1..7}
for net in {1..10}
do
echo Evaluating network net${net}...
for spec in `ls $1/net${net}/`
Expand Down
7 changes: 4 additions & 3 deletions code/verifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
DEVICE = 'cpu'
DTYPE = torch.float32
LR = 0.05
num_iter = 50
num_iter = 25


# class DeepPoly:
Expand Down Expand Up @@ -275,16 +275,17 @@ def main():

inputs, true_label, eps = get_spec(args.spec, dataset)
net = get_net(args.net, net_name)
print(net)

outs = net(inputs)
pred_label = outs.max(dim=1)[1].item()
assert pred_label == true_label

# '''
if analyze(net, inputs, eps, true_label):
print('verified')
else:
print('not verified')

# '''

if __name__ == '__main__':
main()

0 comments on commit 2b02834

Please sign in to comment.