목록Wireless Comm./CISL (16)
UOMOP
def spectrum(img) : f = np.fft.fft2(img) fshift = np.fft.fftshift(f) magnitude_fshift = np.log(np.abs(fshift) + 1) return magnitude_fshift def average_filter(img, kernel_size) : return cv2.blur(img, (kernel_size, kernel_size)) def gaussian_filter(img, kernel_size) : # cv2.GaussianBlur의 parameter에는 sigma가 존재하는데, 이것은 가우시안 커널의 X, Y 방향의 표준편차이다. return cv2.GaussianBlur(img, (kernel_size, kernel_size)..
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.transforms as tr from torch.utils.data import DataLoader import numpy as np import torchvision.transforms as transforms device = torch.device("cuda:0" if torch.cuda.is_available() else ..
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.transforms as tr from torch.utils.data import DataLoader import numpy as np device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu") print(device) args = { 'BATCH_SIZE' :..
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.transforms as tr from torch.utils.data import DataLoader import numpy as np device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu") print(device) args = { 'BATCH_SIZE' :..