本文整理匯總了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