当前位置: 首页>>代码示例>>Python>>正文


Python data.aligned_dataset方法代码示例

本文整理汇总了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 
开发者ID:Kuzphi,项目名称:EverybodyDanceNow-Temporal-FaceGAN,代码行数:19,代码来源:custom_dataset_data_loader.py

示例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 
开发者ID:arnabgho,项目名称:iSketchNFill,代码行数:22,代码来源:custom_dataset_data_loader.py

示例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 
开发者ID:jessemelpolio,项目名称:non-stationary_texture_syn,代码行数:22,代码来源:custom_dataset_data_loader.py

示例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 
开发者ID:Zhaoyi-Yan,项目名称:Shift-Net_pytorch,代码行数:22,代码来源:custom_dataset_data_loader.py

示例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


注:本文中的torch.utils.data.aligned_dataset方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。