목록Wireless Comm. (94)
UOMOP
import cv2 import math import time import torch import random import torchvision import numpy as np from PIL import Image import torch.nn as nn from numpy import sqrt from tqdm import trange import torch.optim as optim import torch.nn.functional as f import matplotlib.pyplot as plt import torchvision.transforms as tr from torchvision import datasets from sklearn.preprocessing import StandardScal..
SNRdB_list = args['SNR_dB'] learning_rate = args['LEARNING_RATE'] epoch_num = args['NUM_EPOCH'] trainloader = trainloader Rayleigh = 0 model_name_without_SNRdB = 'model_AWGN(color)' import math import torch import random import torchvision import torch.nn as nn from tqdm import tqdm import torch.optim as optim import torch.nn.functional as f import matplotlib.pyplot as plt import torchvision.tr..
import math import torch import torchvision import torch.nn as nn import torch.optim as optim import torch.nn.functional as f import matplotlib.pyplot as plt import torchvision.transforms as tr from torch.utils.data import DataLoader args = { 'BATCH_SIZE' : 50, 'LEARNING_RATE' : 0.001, 'NUM_EPOCH' : 80, 'SNR_dB' : [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17], 'latent_dim' : 100, '..
import cv2 import math import time import torch import random import torchvision import numpy as np from PIL import Image import torch.nn as nn from numpy import sqrt from tqdm import trange import torch.optim as optim import torch.nn.functional as F import matplotlib.pyplot as plt import torchvision.transforms as tr from torchvision import datasets from sklearn.preprocessing import StandardScal..
import cv2 import math import time import torch import random import torchvision import numpy as np from PIL import Image import torch.nn as nn from numpy import sqrt from tqdm import trange import torch.optim as optim import torch.nn.functional as F import matplotlib.pyplot as plt import torchvision.transforms as tr from torchvision import datasets from sklearn.preprocessing import StandardScal..
transf = tr.Compose([tr.ToTensor(), tr.Grayscale(num_output_channels=1) ]) trainset = torchvision.datasets.CIFAR10(root='./data', train=True, download=True, transform=transf) #위에 전처리 trainloader = DataLoader(trainset, batch_size=50, shuffle=True) for data in trainloader : input = data[0] print(type(input)) print(input.shape) plt.imshow(input[0][0]) break