本文整理汇总了Python中torch.utils.data.unaligned_dataset方法的典型用法代码示例。如果您正苦于以下问题:Python data.unaligned_dataset方法的具体用法?Python data.unaligned_dataset怎么用?Python data.unaligned_dataset使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类torch.utils.data
的用法示例。
在下文中一共展示了data.unaligned_dataset方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: CreateDataset
# 需要导入模块: from torch.utils import data [as 别名]
# 或者: from torch.utils.data import unaligned_dataset [as 别名]
def CreateDataset(opt):
dataset = None
if opt.dataset_mode == 'aligned':
from data.aligned_dataset import AlignedDataset
dataset = AlignedDataset()
elif opt.dataset_mode == 'unaligned':
from data.unaligned_dataset import UnalignedDataset
dataset = UnalignedDataset()
elif opt.dataset_mode == 'labeled':
from data.labeled_dataset import LabeledDataset
dataset = LabeledDataset()
elif opt.dataset_mode == 'single':
from data.single_dataset import SingleDataset
dataset = SingleDataset()
else:
raise ValueError("Dataset [%s] not recognized." % opt.dataset_mode)
print("dataset [%s] was created" % (dataset.name()))
dataset.initialize(opt)
return dataset
示例2: CreateDataset
# 需要导入模块: from torch.utils import data [as 别名]
# 或者: from torch.utils.data import unaligned_dataset [as 别名]
def CreateDataset(opt):
dataset = None
if opt.dataset_mode == 'aligned':
from data.aligned_dataset import AlignedDataset
dataset = AlignedDataset()
elif opt.dataset_mode == 'unaligned':
from data.unaligned_dataset import UnalignedDataset
dataset = UnalignedDataset()
elif opt.dataset_mode == 'single':
from data.single_dataset import SingleDataset
dataset = SingleDataset()
elif opt.dataset_mode == 'half_crop':
from data.half_dataset import HalfDataset
dataset = HalfDataset()
else:
raise ValueError("Dataset [%s] not recognized." % opt.dataset_mode)
print("dataset [%s] was created" % (dataset.name()))
dataset.initialize(opt)
return dataset
示例3: CreateDataset
# 需要导入模块: from torch.utils import data [as 别名]
# 或者: from torch.utils.data import unaligned_dataset [as 别名]
def CreateDataset(opt):
dataset = None
if opt.dataset_mode == 'unaligned':
from data.unaligned_dataset import UnalignedDataset
dataset = UnalignedDataset()
elif opt.dataset_mode == 'unaligned_triplet':
from data.unaligned_triplet_dataset import UnalignedTripletDataset
dataset = UnalignedTripletDataset()
else:
raise ValueError("Dataset [%s] not recognized." % opt.dataset_mode)
print("dataset [%s] was created" % (dataset.name()))
dataset.initialize(opt)
return dataset
示例4: CreateDataset
# 需要导入模块: from torch.utils import data [as 别名]
# 或者: from torch.utils.data import unaligned_dataset [as 别名]
def CreateDataset(opt):
dataset = None
from data.unaligned_dataset import UnalignedDataset
dataset = UnalignedDataset()
print("dataset [%s] was created" % (dataset.name()))
dataset.initialize(opt)
# dataset.__getitem__(1)
return dataset