From c285830fa52f4f581c77b66874464061bc639816 Mon Sep 17 00:00:00 2001 From: ChairC <974833488@qq.com> Date: Fri, 22 Nov 2024 21:07:18 +0800 Subject: [PATCH] Update: Replace the MEAN and STD params in dataset. --- sr/dataset.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sr/dataset.py b/sr/dataset.py index 6900172..ff2a96a 100644 --- a/sr/dataset.py +++ b/sr/dataset.py @@ -12,7 +12,7 @@ from PIL import Image from torch.utils.data import Dataset, DataLoader, DistributedSampler -from config.setting import MEAN, STD +from config.setting import SR_MEAN, SR_STD class SRDataset(Dataset): @@ -28,7 +28,7 @@ def __init__(self, image_size=64, dataset_path="", scale=4): # To Tensor Format torchvision.transforms.ToTensor(), # For standardization, the mean and standard deviation - torchvision.transforms.Normalize(mean=MEAN, std=STD) + torchvision.transforms.Normalize(mean=SR_MEAN, std=SR_STD) ]) self.hr_transforms = torchvision.transforms.Compose([ # Resize input size @@ -37,7 +37,7 @@ def __init__(self, image_size=64, dataset_path="", scale=4): # To Tensor Format torchvision.transforms.ToTensor(), # For standardization, the mean and standard deviation - torchvision.transforms.Normalize(mean=MEAN, std=STD) + torchvision.transforms.Normalize(mean=SR_MEAN, std=SR_STD) ]) def __getitem__(self, index):