Coder Social home page Coder Social logo

aaqnn's Introduction

How to run

After you did both the setup of the QNN and for the attacker 'DeepGame' run the following:

python launcher.py 'seed_number' 'first_image' 'last_image' 'dataset'

Where:

seed_number: set the seed for the execution. Note: if the seed does not match any of the stored weights (previous training) the net is going to be trained from scratch.

First Image: index of the first image. On Cifar10, mnist max value is 9999.

Last Image: index of the last image. On Cifar10, mnist max value is 10000.

dataset: we support mnist, cifar10, fashion.

How to start the process on CloudLab

$ (screen -R)
$ git clone https://github.com/soarlab/AAQNN.git && cd AAQNN && ./repo-init.sh && source venv/bin/activate
$ python launcher.py 10 0 1 mnist 
$ (ctr+a d)
$ (exit)

How to run the analysis on super-computer

python launcher.py 10 0 10000 mnist

This is how we should run the analysis. What we need to tune is only the variable 'concurrentProcesses' described in the following.

'concurrentProcesses' describes how many pairs (ImageNumber, QuantizationLevel) are being attacked at the same time.

Ex. (img=10,Q=2) and (img=10,Q=4) are two different pairs!

If we figure out there is space for more parallelization (ex. CPU's usage is 60%), we can easily modify in 'executor.py' the variable 'concurrentProcesses'.

Prerequisite

Installed pylearn2

Install

python 3.6
pip3 install -r requirements.txt

Test installation

python test_installation.py

If nothing crashes for a minute, it's all right, the installation is successful.

Run

python3 launcher.py

aaqnn's People

Contributors

martinmatak avatar rospoly avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

aaqnn's Issues

Cleaning up the repo a bit

We should:

  • Remove pycache folders from github. No need to have those version controlled
  • Organize scripts so that they are not in the top level folder
  • Write a short document describing what each folder contains. The structure is unclear at this point.
    Given that we are probably going to leverage this code for quite a bit, it would be good to clean it up somewhat.

Organize structure of the project

  • Organize scripts so that they are not in the top level folder
  • Write a short document describing what each folder contains. The structure is unclear at this point. Given that we are probably going to leverage this code for quite a bit, it would be good to clean it up somewhat.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.