Skip to content

Latest commit

 

History

History
96 lines (73 loc) · 3.73 KB

README.md

File metadata and controls

96 lines (73 loc) · 3.73 KB

PyTorch Hands On

python PyTorch

Imports: isort Code style: black pre-commit code-quality

License: MIT

Description

This project serves as a starting point for anyone who wants to learn how to use PyTorch to perform deep learning tasks, such as image classification, semantic segmentation, etc.

Table of Contents

Setup

  1. Download the repository:
    # Clone project
    git clone https://github.com/creatis-myriad/pytorch-hands-on.git
    cd pytorch-hands-on
  2. Create a virtual environment (Conda is strongly recommended):
    # Create conda environment
    conda env create -f environment.yaml
    conda activate pytorch-hands-on
  3. If you already have a python environment set aside for this project and just want to install the dependencies, you can do that using the following command:
    # Activate your environment: below is an example with conda
    conda activate <env name>
    # Install pytorch with conda or pip: below is an example with conda
    conda install pytorch torchvision torchaudio pytorch-cuda=11.8 -c pytorch -c nvidia
    # Install other dependencies
    pip install -e .

How to Run

Once you've gone through the setup instructions above, you can start exploring the tutorial's notebooks. We recommend using JupyterLab to run the notebooks, which can be launched by running (from within your environment):

jupyter-lab

When you've launched JupyterLab's web interface, you can simply navigate to any of the tutorials listed below, and follow the instructions in there!

Available Tutorials

Semantic Segmentation

How to Contribute

If you want to contribute to the project, then you have to install development dependencies and pre-commit hooks, on top of the basic setup for using the project, detailed above. The pre-commit hooks are there to ensure that any code committed to the repository meets the project's format and quality standards.

# Install development dependencies
pip install -e .[dev]

# Install pre-commit hooks
pre-commit install