Beispiel #1
0
opt.is_clip = False
opt.CR = 0 if not opt.is_clip else 1
opt.is_regu_PAPR = False
opt.is_regu_sigma = False

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

if not opt.is_clip:
    opt.CR = 0

########################################  OFDM setting  ###########################################

size_after_compress = (opt.size //
                       (opt.n_downsample**2))**2 * (opt.C_channel // 2)

opt.N = opt.batchSize  # Batch size
opt.P = 1  # Number of symbols
opt.M = 64  # Number of subcarriers per symbol
opt.K = 16  # Length of CP
opt.L = 8  # Number of paths
opt.decay = 4
opt.S = size_after_compress // opt.M  # Number of packets

opt.is_cfo = False
opt.is_trick = True
opt.is_cfo_random = False
opt.max_ang = 1.7
opt.ang = 1.7

if opt.CE not in ['LS', 'MMSE', 'TRUE']:
    raise Exception("Channel estimation method not implemented")
Beispiel #2
0

# 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.model = 'StoGAN'


opt.num_test = 2000
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

model.eval()

if os.path.exists(output_path) == False:
    os.makedirs(output_path)
else:
    shutil.rmtree(output_path)
    os.makedirs(output_path)


PSNR_list = []
SSIM_list = []
for i, data in enumerate(dataset):