docstr: :param data_feature_outputs: A list of Output objects, indicating the
      dimension, type, normalization of each feature
  :param data_attribute_outputs A list of Output objects, indicating the
      dimension, type, normalization of each attribute
  :param real_attribute_mask: List of True/False, the length equals the
      number of attributes. False if the attribute is (max-min)/2 or
      (max+min)/2, True otherwise
  :param num_packing: Packing degree in PacGAN (a method for solving mode
      collapse in NeurIPS 2018, see https://arxiv.org/abs/1712.04086), the
      value defaults to 1.
docstr_tok: [":","param","data_feature_outputs",":","A","list","of","Output","objects",",","indicating","the","dimension",",","type",",","normalization","of","each","feature",":","param","data_attribute_outputs","A","list","of","Output","objects",",","indicating","the","dimension",",","type",",","normalization","of","each","attribute",":","param","real_attribute_mask",":","List","of","True\/False",",","the","length","equals","the","number","of","attributes",".","False","if","the","attribute","is","(","max-min",")","\/2","or","(","max+min",")","\/2",",","True","otherwise",":","param","num_packing",":","Packing","degree","in","PacGAN","(","a","method","for","solving","mode","collapse","in","NeurIPS","2018",",","see","https",":","\/\/arxiv.org\/abs\/1712.04086",")",",","the","value","defaults","to","1","."]
code: def __init__(
      self,
      data_feature_outputs,
      data_attribute_outputs,
      real_attribute_mask,
      sample_len,
      L_max,
      num_packing=1,
      # discriminator parameters
      discriminator_num_layers=5,
      discriminator_num_units=200,
      # attr_discriminator parameters
      attr_discriminator_num_layers=5,
      attr_discriminator_num_units=200,
      # generator parameters
      attribute_num_units=100,
      attribute_num_layers=3,
      feature_num_units=100,
      feature_num_layers=2,
      attribute_input_noise_dim=5,
      addi_attribute_input_noise_dim=5,
      initial_state=RNNInitialStateType.RANDOM,
  ):
      """
      :param data_feature_outputs: A list of Output objects, indicating the
          dimension, type, normalization of each feature
      :param data_attribute_outputs A list of Output objects, indicating the
          dimension, type, normalization of each attribute
      :param real_attribute_mask: List of True/False, the length equals the
          number of attributes. False if the attribute is (max-min)/2 or
          (max+min)/2, True otherwise
      :param num_packing: Packing degree in PacGAN (a method for solving mode
          collapse in NeurIPS 2018, see https://arxiv.org/abs/1712.04086), the
          value defaults to 1.
      """
      super().__init__()
      self.data_feature_outputs = data_feature_outputs
      self.data_attribute_outputs = data_attribute_outputs
      self.num_packing = num_packing
      self.sample_len = sample_len
      self.real_attribute_mask = real_attribute_mask
      self.feature_out_dim = (
          np.sum([t.dim for t in data_feature_outputs])
          * self.sample_len
      )
      self.attribute_out_dim = np.sum(
          [t.dim for t in data_attribute_outputs]
      )
  
      self.generator = DoppelGANgerGenerator(
          feed_back=False,
          # feed back mode has not been supported
          noise=True,
          feature_outputs=data_feature_outputs,
          attribute_outputs=data_attribute_outputs,
          real_attribute_mask=real_attribute_mask,
          sample_len=sample_len,
          attribute_num_units=attribute_num_units,
          attribute_num_layers=attribute_num_layers,
          feature_num_units=feature_num_units,
          feature_num_layers=feature_num_layers,
          attribute_input_noise_dim=attribute_input_noise_dim,
          addi_attribute_input_noise_dim=addi_attribute_input_noise_dim,
          attribute_dim=None,
          # known attribute feed-in has not been supported
          initial_state=initial_state,
          # only ZERO and RANDOM are supported
          initial_stddev=0.02,
      )  # placehold without any usage
      self.discriminator = Discriminator(
          input_size=(
              int(self.feature_out_dim * L_max / self.sample_len)
          )
          * self.num_packing
          + self.attribute_out_dim,
          num_layers=discriminator_num_layers,
          num_units=discriminator_num_units,
      )
      self.attr_discriminator = AttrDiscriminator(
          input_size=self.attribute_out_dim,
          num_layers=attr_discriminator_num_layers,
          num_units=attr_discriminator_num_units,
      )
  
file_path: BigDL/python/chronos/src/bigdl/chronos/simulator/doppelganger/doppelganger.py
imports: import numpy
  from tqdm import tqdm
  import datetime
  import os
  import math
  import sys
  import torch
  import torch.nn
  from .network import Discriminator, AttrDiscriminator, DoppelGANgerGenerator, RNNInitialStateType
label_desc: Use image node_id 1 to create a new DoppelGANger object from inherited base classes: nn with example: obj = DoppelGANger(data_feature_outputs, data_attribute_outputs, real_attribute_mask, sample_len, L_max, num_packing, discriminator_num_layers, discriminator_num_units, attr_discriminator_num_layers, attr_discriminator_num_units, attribute_num_units, attribute_num_layers, feature_num_units, feature_num_layers, attribute_input_noise_dim, addi_attribute_input_noise_dim, initial_state)