Useful code for testing new Deep Learning algorithms.
Project description
JoeTorch
A Python library containing useful utilities for testing new Deep Learning algorithms.
Installation
Install using pip:
pip install joetorch
Features
-
Dataset Utilities
- MNIST dataset loader with validation split and augmentation options
- PreloadedDataset class for efficient data handling
- Support for custom datasets
-
Neural Network Components
- MLP (Multi-Layer Perceptron) module
- Convolutional blocks (Encoder/Decoder)
- Auto-encoder architectures
-
Training Utilities
- Learning rate schedulers (Cosine, Step, Flat)
- Mixed precision training support
- TensorBoard logging integration
- Optimized weight decay handling
-
Loss Functions
- MSE reconstruction loss
- BCE reconstruction loss
- KL divergence loss
- Smooth L1 loss
- Negative cosine similarity
-
Feature Analysis
- Feature correlation analysis
- Feature standard deviation metrics
- Representation analysis tools
Example Usage
from joetorch.datasets import MNIST
from joetorch.nn import MNIST_AE
from joetorch.optim import get_optimiser, train
# Load MNIST dataset
train_dataset = MNIST(root='datasets/', split='train', val_ratio=0.1,
augment=True, device='cuda')
val_dataset = MNIST(root='datasets/', split='val', val_ratio=0.1,
device='cuda')
# Create model and optimizer
model = MNIST_AE(out_dim=20, mode='cnn').to('cuda')
optimizer = get_optimiser(model, optim='AdamW')
# Train the model
train(model, train_dataset, val_dataset, optimizer,
num_epochs=50, batch_size=256)
Requirements
- Python >= 3.7
- PyTorch >= 1.19.2
- NumPy >= 1.19.2
License
This project is licensed under the MIT License - see the LICENSE file for details.
Author
Joe Griffith (joeagriffith@gmail.com)
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
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 joetorch-0.0.40.tar.gz.
File metadata
- Download URL: joetorch-0.0.40.tar.gz
- Upload date:
- Size: 17.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
57177d8b1a6ba6408896c047ddfef4d299299b0ff4024b9a81bfa6f0933d3e5c
|
|
| MD5 |
784ebc68e4cdd74e97b3f141aa35c40d
|
|
| BLAKE2b-256 |
1ed3b196940f73cd424ccfb793e5d625a28bd2604e3423ed5a86277b47d24354
|
File details
Details for the file joetorch-0.0.40-py3-none-any.whl.
File metadata
- Download URL: joetorch-0.0.40-py3-none-any.whl
- Upload date:
- Size: 20.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d776ca0b25f5e169efaf01cdd13da86a4488cdfc10068235d85c9c1874783506
|
|
| MD5 |
057640eb9c804d4a1cc619a8393c127d
|
|
| BLAKE2b-256 |
ebe3af7b6b3b7c1118b80a8e014361cda9b3acef428bddb1186d6668b0959e6c
|