Skip to main content

GANs-Implementations

License PyPi Version PyPi Downloads Package Status

GANs Implementations and other generative models + Training (in ./notebooks)

Implemented:

  • Vanilla GAN
  • DCGAN - Deep Convolutional GAN
  • WGAN - Wasserstein GAN
  • SNGAN - Spectrally Normalized GAN
  • SRGAN - Super Resolution GAN
  • StyleGAN
  • Pix2PixHD
  • C-VAE - Convolutional Variational Auto-encoder

Installation

PyPi Installation

$ pip install gans-implementations

Local Install and Run:

$ cd {PROJECT_DIRECTORY}
$ pip install -e .

Example

In notebooks directory there is a notebook on how to use each of these models for their intented use case; such as image generation for StyleGAN and others. Check them out!

from gans_package.models import StyleGAN_Generator, StyleGAN_Discriminator

in_channels = 256
out_channels = 3
hidden_channels = 512
z_dim = 128
mapping_hidden_size = 256
w_dim = 512
synthesis_layers = 5
kernel_size=3

in_size = 3
d_hidden_size = 16

g = StyleGAN_Generator(in_channels, 
                       out_channels, 
                       hidden_channels, 
                       z_dim, 
                       mapping_hidden_size, 
                       w_dim, 
                       synthesis_layers, 
                       kernel_size, 
                       device=DEVICE).to(DEVICE)

d = StyleGAN_Discriminator(in_size, d_hidden_size).to(DEVICE)

import torch

noise = torch.randn(BATCH_SIZE, z_dim).to(DEVICE)

fake = g(noise)
pred = d(fake)

Handwritten Digits - MNIST

Work Cited

https://arxiv.org/pdf/1609.04802v5.pdf

https://arxiv.org/pdf/1812.04948.pdf

https://www.coursera.org/specializations/generative-adversarial-networks-gans?

Metadata

Release files for gans-implementations 0.1.0

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

Source distribution (sdist)

Source distribution for gans-implementations 0.1.0
File Size Uploaded Provenance
gans_implementations-0.1.0.tar.gz 8.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for gans-implementations 0.1.0
File Interpreter ABI Platform
gans_implementations-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 21.8 kB

Release files / gans_implementations-0.1.0.tar.gz

Download URL gans_implementations-0.1.0.tar.gz
Size 8.5 kB
Tags Source
SHA-256 checksum
How to use checksums
485f155be3f3edf0a60b4d8856f2a48c4825b1a1cb2194e67ac2078dd04b4306
BLAKE2b-256 checksum
How to use checksums
e8fc516b095f0caab3fc7aa5ca6608aaef713f1497a20289735c75e0ac9a8fbe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.8.10

Release files / gans_implementations-0.1.0-py3-none-any.whl

Download URL gans_implementations-0.1.0-py3-none-any.whl
Size 13.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e62156a4b82e8137c6c86f1ac24aa7897fceeffac99f7afe50dfc0366cf95e23
BLAKE2b-256 checksum
How to use checksums
8b4c7773efc97eacabcb046ebcf0b8c7aa259a46359455495e1e0b516b890d6e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.8.10

Security for gans-implementations 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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