Skip to main content

Start training models (including ViTs) with NetsPresso Trainer, compress and deploy your model with NetsPresso!

Table of contents

Installation (Stable)

Prerequisites

  • Python >=3.10
  • PyTorch >=2.0.1

Install with pypi

pip install netspresso_trainer

Install with GitHub

pip install git+https://github.com/Nota-NetsPresso/netspresso-trainer.git@master

To install with editable mode,

git clone -b master https://github.com/Nota-NetsPresso/netspresso-trainer.git
pip install -e netspresso-trainer

Set-up with docker

Please clone this repository and refer to Dockerfile and docker-compose-example.yml.
For docker users, we provide more detailed guide in our Docs.

Getting started

Write your training script in train.py like:

from netspresso_trainer import train_cli

if __name__ == '__main__':
    logging_dir = train_cli()
    print(f"Training results are saved at: {logging_dir}")

Then, train your model with your own configuraiton:

python train.py\
  --data config/data/huggingface/beans.yaml\
  --augmentation config/augmentation/classification.yaml\
  --model config/model/resnet/resnet50-classification.yaml\
  --training config/training.yaml\
  --logging config/logging.yaml\
  --environment config/environment.yaml

Or you can start NetsPresso Trainer by just executing console script which has same feature.

netspresso-train\
  --data config/data/huggingface/beans.yaml\
  --augmentation config/augmentation/classification.yaml\
  --model config/model/resnet/resnet50-classification.yaml\
  --training config/training.yaml\
  --logging config/logging.yaml\
  --environment config/environment.yaml

Please refer to scripts/example_train.sh.

NetsPresso Trainer is compatible with NetsPresso service. We provide NetsPresso Trainer tutorial that contains whole procedure from model train to model compression and benchmark. Please refer to our colab tutorial.

Dataset preparation (Local)

NetsPresso Trainer is designed to accommodate a variety of tasks, each requiring different dataset formats. You can find the specific dataset formats for each task in our documentation.

If you are interested in utilizing open datasets, you can use them by following the instructions.

Image classification

Semantic segmentation

Object detection

Pose estimation

Dataset preparation (Huggingface)

NetsPresso Trainer is also compatible with huggingface dataset. To use datasets of huggingface, please check instructions in our documentations. This enables to utilize a wide range of pre-built datasets which are beneficial for various training scenarios.

Pretrained weights

Please refer to our official documentation for pretrained weights supported by NetsPresso Trainer.

Tensorboard

We provide basic tensorboard to track your training status. Run the tensorboard with the following command:

tensorboard --logdir ./outputs --port 50001 --bind_all

where PORT for tensorboard is 50001.
Note that the default directory of saving result will be ./outputs directory.

Metadata

Release files for netspresso-trainer 1.4.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for netspresso-trainer 1.4.1
File Size Uploaded Provenance
netspresso_trainer-1.4.1.tar.gz 175.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for netspresso-trainer 1.4.1
File Interpreter ABI Platform
netspresso_trainer-1.4.1-py3-none-any.whl Python 3 none any Details

Total release size: 480.5 kB

Release files / netspresso_trainer-1.4.1.tar.gz

Download URL netspresso_trainer-1.4.1.tar.gz
Size 175.5 kB
Tags Source
SHA-256 checksum
How to use checksums
00036a8450e21d782e2f57923cce471fd7899c194d488ddc09b6758123e5034e
BLAKE2b-256 checksum
How to use checksums
b6ec69091442281fea6468e0d95a7f9d16ff786c712811196c25f03e0e8cbfc5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / netspresso_trainer-1.4.1-py3-none-any.whl

Download URL netspresso_trainer-1.4.1-py3-none-any.whl
Size 305.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ddfae007d018530905625fba19c1b82f0e066950b494f81f32edf459f8928786
BLAKE2b-256 checksum
How to use checksums
950ffaac42d9d3697283d4d9d34eaf8a726de22747fcaf8c4eb2ba2ba79df4f2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Security for netspresso-trainer 1.4.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page