class_docstr: Model for Generative Adversarial Networks.
  
  Arguments:
      layers: Generative Adversarial layer container
      noise_dim (Tuple): Dimensionality of the noise feeding the generator
      noise_type (Str): Noise distribution, 'normal' (default) or 'uniform'
      weights_only (bool): set to True if you do not want to recreate layers
                           and states during deserialization from a serialized model
                           description.  Defaults to False.
      name (str): Model name.  Defaults to "model"
      optimizer (Optimizer): Optimizer object which defines the learning rule for updating
                             model parameters (i.e., GradientDescentMomentum, Adadelta)
      k (int): Number of data batches per noise batch
      wgan_param_clamp (float or None): In case of WGAN weight clamp value, None for others
      wgan_train_sched (bool): Whether to use the FAIR WGAN training schedule of critics
class_docstr_tok: ["Model","for","Generative","Adversarial","Networks",".","Arguments",":","layers",":","Generative","Adversarial","layer","container","noise_dim","(","Tuple",")",":","Dimensionality","of","the","noise","feeding","the","generator","noise_type","(","Str",")",":","Noise","distribution",",","'normal","'","(","default",")","or","'uniform'","weights_only","(","bool",")",":","set","to","True","if","you","do","not","want","to","recreate","layers","and","states","during","deserialization","from","a","serialized","model","description",".","Defaults","to","False",".","name","(","str",")",":","Model","name",".","Defaults","to","``","model","''","optimizer","(","Optimizer",")",":","Optimizer","object","which","defines","the","learning","rule","for","updating","model","parameters","(","i.e.",",","GradientDescentMomentum",",","Adadelta",")","k","(","int",")",":","Number","of","data","batches","per","noise","batch","wgan_param_clamp","(","float","or","None",")",":","In","case","of","WGAN","weight","clamp","value",",","None","for","others","wgan_train_sched","(","bool",")",":","Whether","to","use","the","FAIR","WGAN","training","schedule","of","critics"]
docstr: Propagate shapes through the layers to configure, then allocate space.
  
  Arguments:
      dataset (NervanaDataIterator): Dataset iterator to perform initialization on
      cost (Cost): Defines the function which the model is minimizing based
                   on the output of the last layer and the input labels.
docstr_tok: ["Propagate","shapes","through","the","layers","to","configure",",","then","allocate","space",".","Arguments",":","dataset","(","NervanaDataIterator",")",":","Dataset","iterator","to","perform","initialization","on","cost","(","Cost",")",":","Defines","the","function","which","the","model","is","minimizing","based","on","the","output","of","the","last","layer","and","the","input","labels","."]
code: def initialize(self, dataset, cost=None):
      """
      Propagate shapes through the layers to configure, then allocate space.
  
      Arguments:
          dataset (NervanaDataIterator): Dataset iterator to perform initialization on
          cost (Cost): Defines the function which the model is minimizing based
                       on the output of the last layer and the input labels.
      """
      if self.initialized:
          return
  
      # Propagate shapes through the layers to configure
      prev_input = self.layers.configure(self.noise_dim)
  
      if cost is not None:
          cost.initialize(prev_input)
          self.cost = cost
  
      # Now allocate space
      self.layers.generator.allocate(accumulate_updates=False)
      self.layers.discriminator.allocate(accumulate_updates=True)
      self.layers.allocate_deltas()
      self.initialized = True
  
      self.zbuf = self.be.iobuf(self.noise_dim)
      self.ybuf = self.be.iobuf((1,))
      self.z0 = self.be.iobuf(
          self.noise_dim
      )  # a fixed noise buffer for generating images
      self.fill_noise(self.z0, normal=(self.noise_type == "normal"))
      self.cost_dis = np.empty((1,), dtype=np.float32)
      self.current_batch = self.gen_iter = self.last_gen_batch = 0
  
imports: from __future__ import division, print_function
  from builtins import str, zip
  from collections import OrderedDict
  import logging
  from neon import __version__
  from neon import NervanaObject, logger
  from neon.backends.backend import Block
  from neon.transforms import CrossEntropyBinary, Logistic
  from neon.util.persist import load_obj, save_obj, load_class
  from neon.util.modeldesc import ModelDescription
  from neon.layers import Sequential, Activation
  from neon.layers.container import DeltasTree, SkipThought
  from neon.util.beamsearch import BeamSearch
  from neon.optimizers.optimizer import get_param_list
  import numpy
label_desc: Use image node_id 4 for calling the GAN obj's underlying member method code with example usage: obj.initialize(dataset, cost) without return types