Giter Club home page Giter Club logo

part_8ahy's Introduction

PaRT: Parallel Learning for Robust and Transparent AI

This repository contains the code for PaRT, an algorithm for training a base network on multiple tasks in parallel. The diagram of PaRT is shown in the figure below.

Below, we provide details regarding dependencies and the instructions for running the code for each experiment. We have prepared scripts for each experiment to help the user have a smooth experience.

Dependencies

  • python >= 3.8
  • pytorch >= 1.7
  • scikit-learn
  • torchvision
  • tensorboard
  • matplotlib
  • pillow
  • psutil
  • scipy
  • numpy
  • tqdm

SETUP ENVIRONMENT

To setup the conda env and create the required directories go to the scripts directory and run the following commands in the terminal:

conda init bash
bash -i setupEnv.sh

Check that the final output of these commands is:

Installed torch version {---}
Virtual environment was made successfully

CIFAR 100 EXPERIMENTS

Instructions to run the code for the CIFAR100 experiments:

--------------------- BASELINE EXPERIMENTS ---------------------

To run the baseline experiments for the first seed, go to the scripts directory and run the following command in the terminal:

bash -i runCIFAR100Baseline.sh ../../scripts/test_case0_cifar100_baseline.json

To run the experiment for other seeds, simply change the value of test_case in test_case0_cifar100_baseline.json to 1,2,3, or 4.

--------------------- PARALLEL EXPERIMENTS ---------------------

To run the parallel experiments for the first seed, go to the scripts directory and run the following command in the terminal:

bash -i runCIFAR100Parallel.sh ../../scripts/test_case0_cifar100_parallel.json

To run the experiment for other seeds, simply change the value of test_case in test_case0_cifar100_parallel.json to 1,2,3, or 4.

CIFAR 10 AND CIFAR 100 EXPERIMENTS

Instructions to run the code for the CIFAR10 and CIFAR100 experiments:

--------------------- BASELINE EXPERIMENTS ---------------------

To run the parallel experiments for the first seed, go to the scripts directory and run the following command in the terminal:

bash -i runCIFAR10_100Baseline.sh ../../scripts/test_case0_cifar10_100_baseline.json

To run the experiment for other seeds, simply change the value of test_case in test_case0_cifar10_100_baseline.json to 1,2,3, or 4.

--------------------- PARALLEL EXPERIMENTS ---------------------

To run the baseline experiments for the first seed, go to the scripts directory and run the following command in the terminal:

bash -i runCIFAR10_100Parallel.sh ../../scripts/test_case0_cifar10_100_parallel.json

To run the experiment for other seeds, simply change the value of test_case in test_case0_cifar10_100_parallel.json to 1,2,3, or 4.

FIVETASKS EXPERIMENTS

The dataset for this experiment can be downloaded from the link provided by the CPG GitHub Page or Here. Instructions to run the code for the FiveTasks experiments:

--------------------- BASELINE EXPERIMENTS ---------------------

To run the baseline experiments for the first seed, go to the scripts directory and run the following command in the terminal:

bash -i run5TasksBaseline.sh ../../scripts/test_case0_5tasks_baseline.json

To run the experiment for other seeds, simply change the value of test_case in test_case0_5tasks_baseline.json to 1,2,3, or 4.

--------------------- PARALLEL EXPERIMENTS ---------------------

To run the parallel experiments for the first seed, go to the scripts directory and run the following command in the terminal:

bash -i run5TasksParallel.sh ../../scripts/test_case0_5tasks_parallel.json

To run the experiment for other seeds, simply change the value of test_case in test_case0_5tasks_parallel.json to 1,2,3, or 4.

Paper

Please cite our paper:

Paknezhad, M., Rengarajan, H., Yuan, C., Suresh, S., Gupta, M., Ramasamy, S., Lee H. K., PaRT: Parallel Learning Towards Robust and Transparent AI, arXiv:2201.09534 (2022)

part_8ahy's People

Contributors

mahsapaknezhad avatar trellixvulnteam avatar

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.