Skip to main content

Pytorch VQVAE implementation

Example

from vqvae import VQVAE, sequential_encoder, sequential_decoder
from torch.optim import  Adam
from functools import partial

input_channels = 3
output_channels = 3
embedding_length = 256
hidden_channels = 64
beta = 0.25
embedding_size = 512
opt = partial(Adam, lr=2e-4)

encoder = sequential_encoder(input_channels, embedding_size, hidden_channels)  # Encoder from the paper
decoder = sequential_decoder(embedding_size, output_channels, hidden_channels)  # Decoder from the paper
vqvae = VQVAE(encoder, decoder, opt, beta, embedding_length, embedding_size)  # Pytorch-Lightning module, 
                                                                              # hence usable to train the model

Release files for vqvae 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vqvae 1.0.2
File Size Uploaded
vqvae-1.0.2.tar.gz 11.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for vqvae 1.0.2
File Interpreter ABI Platform
vqvae-1.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 13.2 kB

Release files / vqvae-1.0.2.tar.gz

Download URL vqvae-1.0.2.tar.gz
Size 11.6 kB
Tags Source
SHA-256 checksum
How to use checksums
387b7e13caa5291b248676f2b3d9e14ccbb26440373f0778e9d4a49ad13ddd81
BLAKE2b-256 checksum
How to use checksums
54aae2bfa2c7393bf69386696c93c551b4f03fedb9ed10842c74cd1e174bc0f0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.15

Release files / vqvae-1.0.2-py3-none-any.whl

Download URL vqvae-1.0.2-py3-none-any.whl
Size 1.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b7c805ff0b6bd613e6e2bd477ee8cd634e8672523edb44fbf2977ef4be0ca532
BLAKE2b-256 checksum
How to use checksums
15c555a073b3e0ea61a3861f62d465472c41305029260ab59375915b221523a7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.15

Release history Release notifications | RSS feed

This release

1.0.2 This release

2 release files

1.0.0

2 release files

0.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page