readme: ---
  license: apache-2.0
  library_name: pytorch 
  tags:
  - biggan 
  datasets:
  - ImageNet
  ---
  ## Model description
  This is an op-for-op PyTorch reimplementation of DeepMind's BigGAN model with the pre-trained weights from DeepMind [biggan-deep-128](https://tfhub.dev/deepmind/biggan-deep-128/1).
  ## Training and evaluation data
  Model is trained on [ImageNet dataset](https://tfhub.dev/s?dataset=imagenet-ilsvrc-2012-cls). The dataset consists of 10000 classes. All images are resized to 64 * 64 for the sake of convenience. The model takes noise as input and then Conv2DTranspose is used to do upsampling. The output shape consists of 128, 256, or 512 images depending on the model.
  ## How to use this model
  You can use this model to generate new images. 
  ```
  import torch
  from pytorch_pretrained_biggan import (BigGAN, one_hot_from_names, truncated_noise_sample,
                                         save_as_images, display_in_terminal)
  
  model = BigGAN.from_pretrained('biggan-deep-256')
  ```
  You can generate examples using a noise vector.
  ```
  with torch.no_grad():
      output = model(noise_vector, class_vector, truncation)
  ```
  ## Intended use and biases
  This model is not intended for production.
  ### Generated images 
  ![Example](./example.png)
  ### Credits
  @thomwolf
  Thomas Wolf
  @vfdev-5
  vfdev