Skip to main content

A simple package for doing ML training.

Project description

ml_utils

Code for training pytorch modules

Installation

pip install <directory of source code>

Usage example

import ml_utils
from torch import nn


trainer = ml_utils.ClassificationTrainer(model, 
                                         train_dataloader, 
                                         test_dataloader, 
                                         "Adam", 
                                         {"lr": 1e-3}, 
                                         nn.CrossEntropyLoss(),
                                         n_epochs=2,
                                         output_path='run1',
                                         device='cpu',
                                         num_classes=2,
                                         )

results = trainer.train()

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

ml_utils_jme45-0.2.0.tar.gz (7.1 kB view details)

Uploaded Source

Built Distribution

ml_utils_jme45-0.2.0-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file ml_utils_jme45-0.2.0.tar.gz.

File metadata

  • Download URL: ml_utils_jme45-0.2.0.tar.gz
  • Upload date:
  • Size: 7.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.26.0

File hashes

Hashes for ml_utils_jme45-0.2.0.tar.gz
Algorithm Hash digest
SHA256 59f5c0c31919450a914648a89b6726920192ec0adf869f1f63e97667a826a854
MD5 fc222f9875a44011b0da09f4306b257f
BLAKE2b-256 df5e9eaa1870e582028a3bfb536be2bf7d2ea44d567193e6e3133027834144a1

See more details on using hashes here.

File details

Details for the file ml_utils_jme45-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for ml_utils_jme45-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 21bc9e20407ee7ef2aa4282a27b11b5ab3cd04328c13c71500e0d512cfce857c
MD5 316671dfd3b8fd8f2eebfdeebf863708
BLAKE2b-256 94f948e304954601fca94e8445f3bf96cf388507cd131e8e2570d34d08b22be3

See more details on using hashes here.

Supported by

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