목록Main (34)
UOMOP
import torch import torchvision import torchvision.transforms as transforms import matplotlib.pyplot as plt import seaborn as sns def calculate_correlation(patches): flattened_patches = patches.view(patches.size(0), -1) mean_centered = flattened_patches - flattened_patches.mean(dim=1, keepdim=True) norm = mean_centered.norm(dim=1, keepdim=True) norm[norm == 0] = 1 correlation_matrix = torch.mm(m..
import torch import torchvision import torchvision.transforms as transforms import torch import matplotlib.pyplot as plt import seaborn as sns import torch import torchvision import torchvision.transforms as transforms import matplotlib.pyplot as plt import seaborn as sns def calculate_correlation(patches): flattened_patches = patches.view(patches.size(0), -1) mean_centered = flattened_patches -..
import pandas as pd import matplotlib.pyplot as plt # 예시 데이터를 생성합니다. 실제 데이터로 대체해야 합니다. data = { 'SNRdB': [0, 5, 10, 15, 20, 25, 30, 35, 40], '16': [14.887, 16.154, 17.048, 17.507, 17.702, 17.766, 17.786, 17.804, 17.803], '32': [15.842, 17.312, 18.337, 18.996, 19.249, 19.333, 19.365, 19.381, 19.396], '64': [16.925, 18.627, 19.936, 20.736, 21.071, 21.193, 21.251, 21.281, 21.281], '128': [18.112, 2..
import torch import torchvision import matplotlib.pyplot as plt import os import time import math import torch import torchvision from torchvision.transforms import ToTensor, Compose, Normalize import torch.nn as nn from torchvision.utils import make_grid import numpy as np import torch.nn.functional as F device = 'cuda' if torch.cuda.is_available() else 'cpu' def linear_beta_schedule(timesteps,..