A small package
Project description
sitorchtools
Support function for train dataset using Pytorch
Features
Early Stopping based on validation loss
Folder loader based on pytorch DataLoader
Imblanaced image data handling
Spliting Image on Folder to train and test dataset
Usage
- EarlyStopping
from sitorchtools import EarlyStopping, folder_loader, img_folder_split
early_stopping = EarlyStopping(
patience=7,
verbose=True,
delta=0,
path="best_model.pth",
trace_func=print,
model_class=None
)
early_stopping(model, train_loss, valid_loss, y_true, y_pred, plot=False)
- Data Loader
train_set, train_loader = folder_loader.loader(
your_train_path,
transform=your_train_transform,
batch_size=your_bs,
imbalance=True)
- image folder split
img_folder_split.split_folder(path_to_train_data, path_to_test_data, train_ratio)
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
sitorchtools-0.0.1.tar.gz
(4.6 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 sitorchtools-0.0.1.tar.gz.
File metadata
- Download URL: sitorchtools-0.0.1.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3fb58882758f57254714c5f962ccc5b700eb92038e797fece5094bfed6a51199
|
|
| MD5 |
9ef2e600974e56ff5c52c41596295c19
|
|
| BLAKE2b-256 |
2c22373bea42b564096fce5cf3327f2f45209a07e52f9b71816252b0b9d3477b
|
File details
Details for the file sitorchtools-0.0.1-py3-none-any.whl.
File metadata
- Download URL: sitorchtools-0.0.1-py3-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7fdb644de5bdabb119958b0d930ac2eb7be6562474a498bc5b802a7ed3c35f25
|
|
| MD5 |
5af591e9b43bea772f2788ec27842da0
|
|
| BLAKE2b-256 |
86e4f9cd5009fb2cb9ee084aaf3ca6ba980c69102e4df80692617727f425fc98
|