Skip to main content

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

Project description

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.3.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.3-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyautoencoder-1.0.3.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.3.tar.gz
Algorithm Hash digest
SHA256 54238558e94b3d413f93dae3a7a916993f9ef49354c02c4125dea1800557bbb6
MD5 235f451b91db0b318677600076996566
BLAKE2b-256 0e2a0d1d3cb33501e92c37200d7c96349a23f24a5f4ebae860ce4e9383a8636c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyautoencoder-1.0.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 def36c2e37e18650e0d9e80a0d5c3f50f30f829f19d6454fdb6e0f08dbff4323
MD5 7d860df7270633d01600d8adb08f6ce7
BLAKE2b-256 d278059e686d80f29965a26ceeaae3a5ebfba668562277d55509d897a972cc61

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