GithubHelp home page GithubHelp logo

2dnet's Introduction

2D-DDNet with VGG Loss and architecture aware sparse optimizations

2D-DDNet with optimizations

instructions on running at ARC ( or similar system with Slurm and Singularity)

  • Read Access to "/projects/synergy_lab/garvit217/enhancement_data/"
  • Pytorch container 22.04

Pulling container at ARC

Run below commands:

module load containers/singulartiy
singularity pull pytorch22.04.sif docker://nvcr.io/nvidia/pytorch:22.04-py3

Other versions of the container can also be used, but driver compatibility needs to be checked with the driver version on GPU nodes at ARC. Carefully verify from documentation the follow:

  • git checkout
  • cd 2dnet
  • source params.sh
  • sbatch job_tinker.sh
  • output will be generated in slurm-.out

Instructions on profiling

  • source params.sh
  • export enable_profile="true"
  • sbatch job_tinker.sh

Read carefully the comments in job_tinker.sh

Provide access to all users to Python file

  chmod 766 sparse_ddnet.py
  chmod 766 trainers.py

DDNet baseline hyper-parameters

  • batch size: 1
  • learning rate: 0.0001
  • epochs: 50
  • decay rate: 0.95

Enabling Architecture-Aware Optimizations:

  • Mixed precision: export mp=true
  • DoLL Data Loader for Small Datasets export new_load=true
  • Graph Optimizations:
#to enable graph change pytorch version above otherwise, the below two parameters won't be respected

export gr_mode="reduce-overhead"
export gr_back="aot-eager"

Enabling Sparse Optimizations:

export retrain=0 # should be >0 options for prune_t (prune type) mag, l1_struc or random_unstru (default) will be set otherwise
export prune_t="random_unstru" 
export prune_amt=0.5 

Enabling VGG loss

export model="ddnet" # choice ddnet, vgg16 (ddnet with vgg-16 based loss), vgg19 (ddnet with vgg-16 based loss)

Scaling

Make the following changes in job_tinker.sh file

export MASTER_PORT=<some unique value> 

And update below SLURM headers

#SBATCH --ntasks-per-node P
#SBATCH --gpus-per-node G
#SBATCH --nodes N

P: number of parallel process G: Number of GPUs per node

G=P

N: number of nodes

2dnet's People

Contributors

ayushchatur avatar

Watchers

 avatar

Forkers

ritvikprabhu

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.