Beispiel #1
0
    opt.n_layers_D = 3
    opt.label_smooth = 1          # Label smoothing factor (for lsgan and vanilla gan only)
    opt.n_downsample = 3          # Downsample times
    opt.n_blocks = 2              # Numebr of residual blocks
    opt.first_kernel = 5          # The filter size of the first convolutional layer in encoder
    opt.batchSize = 64 
    opt.n_epochs = 30             # # of epochs without lr decay
    opt.n_epochs_decay = 30       # # of epochs with lr decay
    opt.lr_policy = 'linear'      # decay policy.  Availability:  see options/train_options.py
    opt.beta1 = 0.5               # parameter for ADAM
    opt.lr = 5e-4

############################ Things recommanded to be changed ##########################################
# Set up the training procedure           
opt.C_channel = 12       
opt.SNR = 20

opt.is_feedback = False
opt.feedforward = 'EXPLICIT-RES'

opt.N_pilot = 2         # Number of pilots for chanenl estimation
opt.CE = 'MMSE'         # Channel Estimation Method
opt.EQ = 'MMSE'         # Equalization Method
opt.pilot = 'ZadoffChu'      # QPSK or ZadoffChu

opt.is_clip = False
opt.CR = 0 if not opt.is_clip else 1
opt.is_regu_PAPR = True
opt.lam_PAPR = 0.5
opt.is_regu_sigma = False
opt.lam_sigma = 100
Beispiel #2
0
    opt.crop_size = 64
    dataset = create_dataset(opt)  # create a dataset given opt.dataset_mode and other options
    dataset_size = len(dataset)
    print('#training images = %d' % dataset_size)
else:
    raise Exception('Not implemented yet')


if opt.channel == 'bsc':
    opt.ber = 0.1             # Set the bit flip rate for bsc channel
    opt.enc_type = 'hard'
    opt.sample_type = 'gumbel_softmax_hard'
    opt.temp = 0.5
    channel_name = '_BER'+str(opt.ber)+'_'+opt.enc_type+'_'+opt.sample_type
elif opt.channel == 'awgn':
    opt.SNR = 20               # Set the SNR for awgn channel
    channel_name = '_SNR'+str(opt.SNR)
elif opt.channel == 'ofdm':
    pass
else:
    raise Exception('Not implemented yet')


# Display setting
opt.checkpoints_dir = './Checkpoints/'+ opt.dataset_mode + '_' + opt.channel
opt.name = opt.gan_mode + '_C' + str(opt.C_channel) + channel_name

opt.display_env =  opt.dataset_mode + '_' + opt.channel + '_' + opt.name

# Choose the neural network model
opt.model = 'StoGAN'
Beispiel #3
0
    opt.label_smooth = 1          # Label smoothing factor (for lsgan and vanilla gan only)
    opt.n_downsample = 3          # Downsample times
    opt.n_blocks = 4              # Numebr of residual blocks
    opt.first_kernel = 5          # The filter size of the first convolutional layer in encoder
    opt.batch_size = 16
    opt.n_epochs = 20             # # of epochs without lr decay
    opt.n_epochs_decay = 20       # # of epochs with lr decay
    opt.lr_policy = 'linear'      # decay policy.  Availability:  see options/train_options.py
    opt.beta1 = 0.5               # parameter for ADAM
    opt.lr = 5e-4


############################ Things recommanded to be changed ##########################################
# Set up the training procedure
opt.C_channel = 24
opt.SNR = 5

opt.is_feedback = False
opt.feedforward = 'EXPLICIT-RES'

opt.N_pilot = 1              # Number of pilots for chanenl estimation
opt.CE = 'MMSE'              # Channel Estimation Method
opt.EQ = 'MMSE'              # Equalization Method
opt.pilot = 'ZadoffChu'      # QPSK or ZadoffChu

opt.is_clip = False
opt.CR = 0 if not opt.is_clip else 1.2
opt.is_regu_PAPR = False
opt.lam_PAPR = 0.1

opt.lam_h = 0.5
Beispiel #4
0
opt.first_kernel = 5  # The filter size of the first convolutional layer in encoder

# Set the input dataset
opt.dataset_mode = 'CIFAR10'  # Current dataset:  CIFAR10, CelebA

# Set up the training procedure
opt.batchSize = 64  # batch size
opt.n_epochs = 200  # # of epochs without lr decay
opt.n_epochs_decay = 200  # # of epochs with lr decay
opt.lr = 1e-3  # Initial learning rate
opt.lr_policy = 'linear'  # decay policy.  Availability:  see options/train_options.py
opt.beta1 = 0.5  # parameter for ADAM

opt.L = 8
opt.decay = 4
opt.SNR = 0

# Set up the loss function
opt.lambda_L2 = 128  # The weight for L2 loss
opt.is_Feat = False  # Whether to use feature matching loss or not
opt.lambda_feat = 1

##############################################################################################################

if opt.gan_mode == 'wgangp':
    opt.norm_D = 'instance'  # Use instance normalization when using WGAN.  Available: 'instance', 'batch', 'none'
else:
    opt.norm_D = 'batch'  # Used batch normalization otherwise

opt.activation = 'sigmoid'  # The output activation function at the last layer in the decoder
opt.norm_EG = 'batch'