Skip to main content

Easy Neural Network Experiments with pytorch

Project description

EasyTorch is a quick and easy way to start running pytorch experiments. As a phd student, I could not lose time on boilerplate neural network setups, so I started this sort of general framework to run experiments quickly. It consist of rich utilities useful for image manipulation as my research is focused on biomedical images. I would be more than happy if it becomes useful to any one getting started with neural netowrks. Installation

  1. Install pytorch and torchvision from Pytorch official website
  2. pip install easytorch

Link to a full working example

Higlights

  • A convenient framework to easily setup neural network experiments.
  • Minimal configuration to setup a newu experimenton new dataset:
    • Use your choice of Neural Network architecture.
    • Create a python dictionary pointing to data ,ground truth, and mask directory(dataspecs.py).
    • Automatic k-fold cross validation.
    • Automatic logging/plotting, and model checkpointing.
    • Works on all sort of neural network related task.
    • GPU enabled metrics like precision, recall, f1, overlap, and confusion matrix with maximum GPU utilization.
    • Ability to automatically combine all the dataset with correct dataspecs and run on your favourite architecture.

Sample use case as follows:

import argparse

import dataspecs as dspec
from easytorch.utils.defaultargs import ap
from easytorch.runs import run, pooled_run
from classification import MyTrainer, MyDataset

ap = argparse.ArgumentParser(parents=[ap], add_help=False)

dataspecs = [dspec.DRIVE, dspec.STARE]
if __name__ == "__main__":
    run(ap, dataspecs, MyTrainer, MyDataset)
    pooled_run(ap, dataspecs, MyTrainer, MyDataset)
Training+Validation+Test
* $python main.py -p train -nch 3 -e 3 -b 2 -sp True
Only Test
* $python main.py -p test -nch 3 -e 3 -b 2 -sp True

References

Please cite us if you use this framework(easytorch) as follows: @misc{easytorch, author = {Khanal, Aashis}, title = {Quick Neural Network Experimentation}, year = {2020}, publisher = {GitHub}, journal = {GitHub repository}, url = {https://github.com/sraashis/easytorch} }

Project details


Release history Release notifications | RSS feed

This version

0.4

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

easytorch-0.4.tar.gz (15.4 kB view details)

Uploaded Source

File details

Details for the file easytorch-0.4.tar.gz.

File metadata

  • Download URL: easytorch-0.4.tar.gz
  • Upload date:
  • Size: 15.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.5

File hashes

Hashes for easytorch-0.4.tar.gz
Algorithm Hash digest
SHA256 c26b43a86eef16a010d1630a35acae19354186a2eeda7a2cb605a8b4630a1ab0
MD5 437f4efab147fdc8855eb7d7ac56bf8d
BLAKE2b-256 830da059bbe8ac7fac419621b12f040520cb111462d9b21a8ef2462acdd942a5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page