本文整理汇总了Python中torch.utils.data.aligned_dataset方法的典型用法代码示例。如果您正苦于以下问题:Python data.aligned_dataset方法的具体用法?Python data.aligned_dataset怎么用?Python data.aligned_dataset使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类torch.utils.data
的用法示例。
在下文中一共展示了data.aligned_dataset方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: CreateDataset
# 需要导入模块: from torch.utils import data [as 别名]
# 或者: from torch.utils.data import aligned_dataset [as 别名]
def CreateDataset(opt):
dataset = None
if 'face' in opt.name:
from data.aligned_dataset_GAN import AlignedDataset
dataset = AlignedDataset()
elif opt.is_temporal:
from data.aligned_dataset_temporal import AlignedDataset
dataset = AlignedDataset()
else:
from data.aligned_dataset import AlignedDataset
dataset = AlignedDataset()
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 aligned_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
示例3: CreateDataset
# 需要导入模块: from torch.utils import data [as 别名]
# 或者: from torch.utils.data import aligned_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
示例4: CreateDataset
# 需要导入模块: from torch.utils import data [as 别名]
# 或者: from torch.utils.data import aligned_dataset [as 别名]
def CreateDataset(opt):
dataset = None
if opt.dataset_mode == 'aligned':
from data.aligned_dataset import AlignedDataset
dataset = AlignedDataset()
elif opt.dataset_mode == 'aligned_resized':
from data.aligned_dataset_resized import AlignedDatasetResized
dataset = AlignedDatasetResized()
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
示例5: CreateDataset
# 需要导入模块: from torch.utils import data [as 别名]
# 或者: from torch.utils.data import aligned_dataset [as 别名]
def CreateDataset(opt):
dataset = None
from data.aligned_dataset import AlignedDataset
dataset = AlignedDataset()
print("dataset [%s] was created" % (dataset.name()))
dataset.initialize(opt)
return dataset
开发者ID:CUHKSZ-TQL,项目名称:EverybodyDanceNow_reproduce_pytorch,代码行数:10,代码来源:custom_dataset_data_loader.py