Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

joetorch-0.0.27.tar.gz (14.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

joetorch-0.0.27-py3-none-any.whl (17.7 kB view details)

Uploaded Python 3

File details

Details for the file joetorch-0.0.27.tar.gz.

File metadata

  • Download URL: joetorch-0.0.27.tar.gz
  • Upload date:
  • Size: 14.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for joetorch-0.0.27.tar.gz
Algorithm Hash digest
SHA256 2cd65e8b65605c0feecc2febc2f2e6e84d6d7ea51f2455984f9fec30b7b5dd2e
MD5 7be2d853ec0cd159c1128da8248eca3e
BLAKE2b-256 7550daa4d89f80288b718b9377e5ac3b1d1a7df4d5bc878e8f245227c8fe520e

See more details on using hashes here.

File details

Details for the file joetorch-0.0.27-py3-none-any.whl.

File metadata

  • Download URL: joetorch-0.0.27-py3-none-any.whl
  • Upload date:
  • Size: 17.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for joetorch-0.0.27-py3-none-any.whl
Algorithm Hash digest
SHA256 4a77c316427ef0295fe0a2f02afb9df20e5a0f3bc2ebf64bfc1eb3a67fe3f6e0
MD5 a6b46369dd4310f06b54ed682e4872d0
BLAKE2b-256 902ded346b989b8c294fa759dc68010b1c94714256cc821ef644f3445a98ec82

See more details on using hashes here.

Supported by

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