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
Release history Release notifications | RSS feed
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)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
59f5c0c31919450a914648a89b6726920192ec0adf869f1f63e97667a826a854
|
|
| MD5 |
fc222f9875a44011b0da09f4306b257f
|
|
| BLAKE2b-256 |
df5e9eaa1870e582028a3bfb536be2bf7d2ea44d567193e6e3133027834144a1
|
File details
Details for the file ml_utils_jme45-0.2.0-py3-none-any.whl.
File metadata
- Download URL: ml_utils_jme45-0.2.0-py3-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.26.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
21bc9e20407ee7ef2aa4282a27b11b5ab3cd04328c13c71500e0d512cfce857c
|
|
| MD5 |
316671dfd3b8fd8f2eebfdeebf863708
|
|
| BLAKE2b-256 |
94f948e304954601fca94e8445f3bf96cf388507cd131e8e2570d34d08b22be3
|