Skip to main content

A Python package offering implementations of state-of-the-art autoencoder architectures in PyTorch.

Project description

pyautoencoders_logo

pyautoencoder is a lightweight Python package offering clean, minimal implementations of foundational autoencoder architectures in PyTorch. It is designed for researchers, educators, and practitioners seeking a reliable base for experimentation, extension, or instruction.

📦 Installation

pip install pyautoencoder

Or install from source:

git clone https://github.com/andrea-pollastro/pyautoencoder.git
cd pyautoencoder
pip install -e .

🚀 Quick Example

import torch
from pyautoencoder.models import Autoencoder

# Define encoder and decoder
encoder = torch.nn.Sequential(
    torch.nn.Flatten(),
    torch.nn.Linear(784, 32)
)

decoder = torch.nn.Sequential(
    torch.nn.Linear(32, 784),
    torch.nn.Unflatten(1, (1, 28, 28))
)

# Initialize model
model = Autoencoder(encoder, decoder)

# Forward pass
x = torch.randn(64, 1, 28, 28)
x_hat, z = model(x)

🗺️ Roadmap

  • Autoencoder (AE)
  • Variational Autoencoder (VAE)
  • Hierarchical VAE (HVAE)
  • Importance-Weighted AE (IWAE)
  • Denoising Autoencoder (DAE)
  • Sparse Autoencoder (SAE)

🤝 Contributing

Contributions are welcome — especially new autoencoder variants, training examples, and documentation improvements. Please open an issue or pull request to discuss any changes.

📝 Citing

@misc{pollastro2025pyautoencoder,
  Author = {Andrea Pollastro},
  Title = {pyautoencoder},
  Year = {2025},
  Publisher = {GitHub},
  Journal = {GitHub repository},
  Howpublished = {\url{https://github.com/andrea-pollastro/pyautoencoder}}
}

📄 License

This project is licensed under the MIT License. See the LICENSE file for details.

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

pyautoencoder-1.0.1.tar.gz (7.4 kB view details)

Uploaded Source

Built Distribution

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

pyautoencoder-1.0.1-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file pyautoencoder-1.0.1.tar.gz.

File metadata

  • Download URL: pyautoencoder-1.0.1.tar.gz
  • Upload date:
  • Size: 7.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for pyautoencoder-1.0.1.tar.gz
Algorithm Hash digest
SHA256 8f89420e6105e47ad9942c778eb2f9e07e4b3cf1ec4413b5879addf6897d994f
MD5 327282401b3378cfad1d174798d07164
BLAKE2b-256 d246db3121bfe7d7939060ca76899948df1eca2f426aa5fe9dad3e07c7417ec5

See more details on using hashes here.

File details

Details for the file pyautoencoder-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: pyautoencoder-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 8.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for pyautoencoder-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d582d9fd01c6d7844790df8f7ebdca141b1d6f55151c7fb569bf6b9c3056badc
MD5 28b80be090a0a44e58602232c655f14c
BLAKE2b-256 c3106c5cc42fb27b841d13e3b6f545f688da29b64c5bbcd27634e339cb5e1989

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