Example #1
0
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
Example #2
0
import torchvision
import torchvision.transforms as transforms
import scipy.io as sio
import models.channel as chan
import shutil
from pytorch_msssim import ssim, ms_ssim, SSIM, MS_SSIM
import math


# Extract the options
opt = TestOptions().parse()

# For testing  the neural networks, manually edit/add options below
opt.gan_mode = 'none'       # 'wgangp', 'lsgan', 'vanilla', 'none'

opt.C_channel = 16             # The output channel number of encoder (Important: it controls the rate)
opt.n_downsample= 2           # Downsample times 
opt.n_blocks = 2              # Numebr of residual blocks
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 = 1           # batch size

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

if opt.dataset_mode == 'CIFAR10':
    opt.dataroot='./data'