Final report revisions
This commit is contained in:
Binary file not shown.
Before Width: | Height: | Size: 221 KiB After Width: | Height: | Size: 221 KiB |
BIN
poster/MNIST_excerpt.png
Normal file
BIN
poster/MNIST_excerpt.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 14 KiB |
@ -1,21 +0,0 @@
|
||||
model = Net()
|
||||
accuracies = {}
|
||||
|
||||
for filter in filters:
|
||||
for epsilon in epsilons:
|
||||
for strength in range(5):
|
||||
correct = 0
|
||||
total = 0
|
||||
|
||||
for data, target in dataset:
|
||||
atk_data = fgsm_attack(data, epsilon)
|
||||
filt_data = filter(atk_data, filter, strength)
|
||||
prediction = model(filt_data)
|
||||
|
||||
total += 1
|
||||
if prediction == target:
|
||||
correct += 1
|
||||
|
||||
accuracies[filter][epsilon][strength] = correct/total
|
||||
|
||||
save_json("results.json", accuracies)
|
Reference in New Issue
Block a user