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

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyautoencoder-1.0.2.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.2.tar.gz
Algorithm Hash digest
SHA256 e2c1f5249b30b62e6fa047c41bf220ed176d23fc40618fc9ca9bab3fdbb4abca
MD5 089733503f001e10095f190ab81a94e2
BLAKE2b-256 93619f85faa65e72dd05b70db168ace2ef1ddc0c97dd2ff72ffb36c0560475be

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyautoencoder-1.0.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1b5ca07c17e83d21ada0963213b9256fec520454d9a9604e07feb2996d0b093c
MD5 243c70594b465b687a7e05bda63e8ed6
BLAKE2b-256 274045f70e9bd790ffc2efd290f45820bb44b3938ac5246644199732cbc2140f

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