elif opt.dataset_mode == 'CelebA': opt.dataroot = './data/celeba/CelebA_test' opt.load_size = 80 opt.crop_size = 64 opt.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') ################################################################################################## # 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 = False opt.is_regu_sigma = False ##############################################################################################################
opt.dataroot = './data/celeba/CelebA_test' opt.load_size = 80 opt.crop_size = 64 opt.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') opt.iter_temp = 5000 ################################################################################################## # Set up the training procedure opt.C_channel = 12 opt.SNR = 0 opt.is_feedback = False opt.feedforward = 'EXPLICIT-CE-EQ' 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 = False opt.lam_PAPR = 0.3 ##############################################################################################################
print('#training images = %d' % dataset_size) else: raise Exception('Not implemented yet') # Choose the channel opt.channel = 'bsc' # Available channels: 'awgn', 'ofdm', 'bsc' if opt.channel == 'bsc': opt.ber = 0.05 # Set the bit flip rate for bsc channel opt.enc_type = 'prob' 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 = 5 # 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 output_path = './Images/' + opt.dataset_mode + '_' + opt.channel + '/' + opt.name # Choose the neural network model
opt.load_size = 80 opt.crop_size = 64 opt.size = 64 opt.serial_batches = True 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') opt.iter_temp = 5000 ################################################################################################## # Set up the training procedure opt.C_channel = 12 opt.SNR = 15 opt.is_feedback = False opt.feedforward = forward_list[se] 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.lam_h = 0.5 opt.is_hloss = True opt.is_clip = False opt.CR = 0 if not opt.is_clip else 1.2 opt.is_regu_PAPR = False
opt.dataroot = './data/celeba/CelebA_test' opt.load_size = 80 opt.crop_size = 64 opt.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') opt.iter_temp = 5000 ################################################################################################## # Set up the training procedure opt.C_channel = 12 opt.SNR = 5 opt.is_feedback = False opt.feedforward = forward_list[se] 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.lam_h = 0.5 opt.is_hloss = True opt.is_clip = False opt.CR = 0 if not opt.is_clip else 1.2 opt.is_regu_PAPR = False
elif opt.dataset_mode == 'CelebA': opt.dataroot = './data/celeba/CelebA_test' opt.load_size = 80 opt.crop_size = 64 opt.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') opt.L = 8 opt.decay = 4 opt.SNR = 10 # Display setting opt.checkpoints_dir = './Checkpoints/' + opt.dataset_mode + '_PLAIN' opt.name = opt.gan_mode + '_C' + str(opt.C_channel) + '_SNR_' + str(opt.SNR) output_path = './Images/' + opt.dataset_mode + '/' + opt.name # Choose the neural network model opt.model = 'PLAIN' opt.num_test = 10000 opt.how_many_channel = 5 opt.N = opt.how_many_channel model = create_model(opt) # create a model given opt.model and other options model.setup(opt) # regular setup: load and print networks; create schedulers