Skip to main content

No project description provided

Project description

MLVISION

A pytorch train library

Introduction

Most classification tasks do not require to rewrite a train loop in pytorch, using this library allows for fast iteration using any deep learning architecture.

The library can be use for cpu, gpu, and multi gpu training, and implements an efficient train loop as well as logging in order to plot train history.

Installation

You can install it using poetry by running:

poetry install

Usage

Train a Model

To train a model you will need to edit a config file with at least the path of the training and validation data.

For more details on the config you can take a look at the next section.

You can now run the train command using:

# One GPU
poetry run python train.py --config /path/to/config --devices cuda:0

The code support multi gpu training using DDP:

poetry run python train.py --config /path/to/config --devices cuda:0 cuda:1 cuda:2 ...

or cpu training:

poetry run python train.py --config /path/to/config --devices cpu

Config

The config allows you to change multiple hyper parameter of the training:

  • data
    • path to dataset
    • data augmentation
    • workers for data loaders
  • optimization
    • number of epochs
    • learning rate
    • float16 / float32
  • model
    • Architecture (defined in mlvision.models.__init__.py)
    • args: given as kwargs to the model class

Add a new model

You can easily define a new model and use it, to do so create a new file in mlvision/models and add the class in the mlvision.models.__init__.py file.

You should now be able to use it in a config file.

Project details


Download files

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

Source Distribution

mlvision-0.1.0.tar.gz (10.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mlvision-0.1.0-py3-none-any.whl (12.4 kB view details)

Uploaded Python 3

File details

Details for the file mlvision-0.1.0.tar.gz.

File metadata

  • Download URL: mlvision-0.1.0.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.11.4 Linux/5.15.0-1041-azure

File hashes

Hashes for mlvision-0.1.0.tar.gz
Algorithm Hash digest
SHA256 94ee7ca2c4d8e43b73b99b8287c78bed6fc3ff44931156542234a8dccfe99121
MD5 a7c7e601724c80bb7d4232bd3be520bc
BLAKE2b-256 d4176e96ee328d813f8fb7b4178cd239d418333cb9d76abb224f20ec79f28dd9

See more details on using hashes here.

File details

Details for the file mlvision-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: mlvision-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 12.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.11.4 Linux/5.15.0-1041-azure

File hashes

Hashes for mlvision-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 caa189c49b3f1304cf1dc244776568f6286d1c7e99103a39078fc0b8b98b4e54
MD5 76b18913bfc1f09550fa1982f59dc72c
BLAKE2b-256 d0f8f68aeaa2ad9fea0d53a2070eaf5b497db4fd25122ed13491cdcffba2b770

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