Skip to main content

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

Project description

PyAutoencoder

A clean, modular PyTorch library for building and training autoencoders.

logo

PyPI Version Python CI Publish to PyPI License: MIT Downloads Documentation Status Stars


Highlights

PyAutoencoder is designed to offer simple and easy access to autoencoder frameworks. Here's what it offers:

  • Minimal, composable API
    You don't have to inherit from complicated base classes or learn a new training loop. Simply provide your own PyTorch nn.Module encoder and decoder, and plug them into the ready‑to‑use autoencoder wrappers. This makes it easy to experiment with different architectures (e.g. MLPs, CNNs) while reusing the same training pipeline.

  • Ready‑to‑use autoencoders The library ships with working implementations of autoencoders, each paired with their respective loss functions. You can start training in a few lines, without re‑implementing reconstruction likelihoods, KL divergence, or other boilerplate.

  • PyTorch compatibility
    The library is fully compatible with the PyTorch ecosystem, so models integrate naturally with modules, tensors, optimizers, and schedulers.

  • Lightweight, research‑oriented
    The library is intentionally minimal: no training loop frameworks, no heavy abstractions. This makes it well suited for research prototypes where you want control and transparency.

Status: The project is in an early but usable stage. Contributions, issues, and feedback are highly encouraged!

Currently implemented:

  • Autoencoder (AE)
  • Variational Autoencoder (VAE)

Documentation

Full documentation (installation, tutorials, API reference, and examples) is available at:

👉 https://pyautoencoder.readthedocs.io/en/latest/

In particular, see:

  • Examples → MNIST Autoencoder – simple AE on MNIST
  • Examples → MNIST VAE (Kingma & Welling 2013) – reproduction of Fig. 2

Installation

pip install pyautoencoder

Or install from source for development:

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

Examples

The examples/ directory contains runnable scripts, including:

  • mnist_ae.py – standard Autoencoder on MNIST
  • mnist_vae_fig2.py – reproduction of the MNIST VAE experiment from Kingma & Welling (2013), Fig. 2

These examples are also documented and explained in the online documentation.


License

This project is released under the MIT License. See LICENSE.

Citation

If you use this package in academic work, please cite:

@misc{pollastro2025pyautoencoder,
  author       = {Andrea Pollastro},
  title        = {pyautoencoder},
  year         = {2025},
  howpublished = {GitHub repository},
  url          = {https://github.com/andrea-pollastro/pyautoencoder}
}

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.11.tar.gz (420.8 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.11-py3-none-any.whl (28.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyautoencoder-1.0.11.tar.gz
  • Upload date:
  • Size: 420.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pyautoencoder-1.0.11.tar.gz
Algorithm Hash digest
SHA256 5d32ca6c1140c0205b16dcfcc0224bc3b2753485d32019a9756211a5c7591176
MD5 62c304f4072644ae07a23bc4ef67892f
BLAKE2b-256 99e491876a4736e72fb34012c00cf347d5dfb9810c5592948908a6c39a3c9139

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyautoencoder-1.0.11.tar.gz:

Publisher: publish.yml on andrea-pollastro/pyautoencoder

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: pyautoencoder-1.0.11-py3-none-any.whl
  • Upload date:
  • Size: 28.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pyautoencoder-1.0.11-py3-none-any.whl
Algorithm Hash digest
SHA256 e474fb2cac8093ef1c0c6494894c99e073f19982d6bffc00d05ec5b764d1b75c
MD5 c1696fddeb9761e3dbfa79d5a2f7f94a
BLAKE2b-256 49737862ae6cb01bf84f14147bd79ae8714e7ffe4dc3ff5bcb55daa4a8ad778f

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyautoencoder-1.0.11-py3-none-any.whl:

Publisher: publish.yml on andrea-pollastro/pyautoencoder

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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