本文整理汇总了Python中torch.utils.data.LQ_dataset方法的典型用法代码示例。如果您正苦于以下问题:Python data.LQ_dataset方法的具体用法?Python data.LQ_dataset怎么用?Python data.LQ_dataset使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类torch.utils.data
的用法示例。
在下文中一共展示了data.LQ_dataset方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: create_dataset
# 需要导入模块: from torch.utils import data [as 别名]
# 或者: from torch.utils.data import LQ_dataset [as 别名]
def create_dataset(dataset_opt):
mode = dataset_opt['mode']
if mode == 'LQ':
from data.LQ_dataset import LQDataset as D
elif mode == 'LQGT':
from data.LQGT_dataset import LQGTDataset as D
# elif mode == 'LQGTseg_bg':
# from data.LQGT_seg_bg_dataset import LQGTSeg_BG_Dataset as D
else:
raise NotImplementedError('Dataset [{:s}] is not recognized.'.format(mode))
dataset = D(dataset_opt)
logger = logging.getLogger('base')
logger.info('Dataset [{:s} - {:s}] is created.'.format(dataset.__class__.__name__,
dataset_opt['name']))
return dataset
示例2: create_dataset
# 需要导入模块: from torch.utils import data [as 别名]
# 或者: from torch.utils.data import LQ_dataset [as 别名]
def create_dataset(dataset_opt):
mode = dataset_opt['mode']
if mode == 'LQ': #Predictor
from data.LQ_dataset import LQDataset as D
dataset = D(dataset_opt)
elif mode == 'LQGTker': #SFTMD
from data.LQGTker_dataset import LQGTKerDataset as D
dataset = D(dataset_opt)
elif mode == 'SRker': #Corrector
from data.SRker_dataset import SRkerDataset as D
dataset = D(dataset_opt)
# elif mode == 'LQGTseg_bg':
# from data.LQGT_seg_bg_dataset import LQGTSeg_BG_Dataset as D
else:
raise NotImplementedError('Dataset [{:s}] is not recognized.'.format(mode))
logger = logging.getLogger('base')
logger.info('Dataset [{:s} - {:s}] is created.'.format(dataset.__class__.__name__,
dataset_opt['name']))
return dataset
示例3: create_dataset
# 需要导入模块: from torch.utils import data [as 别名]
# 或者: from torch.utils.data import LQ_dataset [as 别名]
def create_dataset(dataset_opt):
mode = dataset_opt['mode']
# datasets for image restoration
if mode == 'LQ':
from data.LQ_dataset import LQDataset as D
elif mode == 'LQGT':
from data.LQGT_dataset import LQGTDataset as D
# datasets for video restoration
elif mode == 'REDS':
from data.REDS_dataset import REDSDataset as D
elif mode == 'Vimeo90K':
from data.Vimeo90K_dataset import Vimeo90KDataset as D
elif mode == 'video_test':
from data.video_test_dataset import VideoTestDataset as D
else:
raise NotImplementedError('Dataset [{:s}] is not recognized.'.format(mode))
dataset = D(dataset_opt)
logger = logging.getLogger('base')
logger.info('Dataset [{:s} - {:s}] is created.'.format(dataset.__class__.__name__,
dataset_opt['name']))
return dataset