목록분류 전체보기 (295)
UOMOP
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 matplotlib.pyplot as plt X = [0.3, 0.75, 0.9] Y1 = [83.4, 84.9, 83] Y2 = [84.9, 88.9, 87.3] # 각각의 그래프에 다른 색상을 지정 plt.plot(X, Y2, color='blue', marker='o', alpha=0.5, linewidth=2, label='My result (Cifar10)') plt.plot(X, Y1, color='red', marker='o', alpha=0.5, linewidth=2, label='Paper result (ImageNet)') plt.title("Paper result vs My result") plt.ylabel("Accuracy") plt.xlabel("Masking rat..
import matplotlib.pyplot as plt import numpy as np import pandas as pd a = [64.3, 69.12, 71] b = [55.2, 67.3, 73.2] year = ['0dB', '5dB', '10dB'] df = pd.DataFrame({'DeepJSCC' : a, 'MAE+JSCC' : b}, index = year) # 그림 사이즈, 바 굵기 조정 fig, ax = plt.subplots(figsize=(8,6)) bar_width = 0.35 # 연도가 4개이므로 0, 1, 2, 3 위치를 기준으로 삼음 index = np.arange(3) # 각 연도별로 3개 샵의 bar를 순서대로 나타내는 과정, 각 그래프는 0.25의 간격을 두고 그려짐..
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,..
import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim import numpy as np import matplotlib.pyplot as plt from torchvision import models,transforms from torchvision.utils import make_grid from torchvision.datasets import CIFAR10 from torch.utils.data.sampler import SubsetRandomSampler from mpl_toolkits.axes_grid1 import ImageGrid #from torchsummary import ..
import numpy as np import torch import torchvision import torchvision.transforms as transforms from PIL import Image import io from matplotlib import pyplot as plt import numpy as np transform = transforms.Compose([transforms.ToTensor()]) trainset = torchvision.datasets.CIFAR10(root='./data', train=True, download=True, transform=transform) trainloader = torch.utils.data.DataLoader(trainset, batc..