Coder Social home page Coder Social logo

Evolutionary strategies

This is a repository for training machine learning models using NES, and running adversarial attacks against said models.

Setup

git clone https://github.com/Evolutionary-strategies/Evolutionary-strategies.git   
cd Evolutionary-strategies   
pip3 install -r requirements.txt

Running

First change directory to es:

cd es

Then open main.py and choose what to run within the file, then use the command:

python main.py

To train NES models change the branch to training, and run main

Structure

In the scripts folder you will find scripts for setup, and for plotting model accuracy to graph.

In the models folder you will find the starting weights used for model training in our experiments.

In the es folder you will find the main research code.

Files in the es folder:

  • adversarial_attack.py contains a foolbox implementation of adversarial attacks
  • dist.py is used for communication between master and worker using redis
  • es.py contains the NES training algorithm and relevant methods
  • main.py contains startup configuration and the main function
  • model.py contains our model architecture and relevant methods
  • print_img.py is used for printing images from the dataset
  • util.py contains different helper methods

Known issues

Running adveserial_attack.py might cause an error on some computers. We believe the error is caused by multiprosessing the foolbox library in conjunction with cuda.

evolutionary-strategies's Projects

ares icon ares

A Python library for adversarial machine learning focusing on benchmarking adversarial robustness.

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.