本文整理汇总了Python中dataset.DatasetFromFolder方法的典型用法代码示例。如果您正苦于以下问题:Python dataset.DatasetFromFolder方法的具体用法?Python dataset.DatasetFromFolder怎么用?Python dataset.DatasetFromFolder使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类dataset
的用法示例。
在下文中一共展示了dataset.DatasetFromFolder方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: get_training_set
# 需要导入模块: import dataset [as 别名]
# 或者: from dataset import DatasetFromFolder [as 别名]
def get_training_set(data_dir, nFrames, upscale_factor, data_augmentation, file_list, other_dataset, patch_size, future_frame):
print("Training samples chosen:", file_list)
return DatasetFromFolder(data_dir,nFrames, upscale_factor, data_augmentation, file_list, other_dataset, patch_size,future_frame,
transform=transform())
示例2: get_test_set
# 需要导入模块: import dataset [as 别名]
# 或者: from dataset import DatasetFromFolder [as 别名]
def get_test_set(upscale_factor):
root_dir = download_bsd300()
test_dir = join(root_dir, "test")
crop_size = calculate_valid_crop_size(256, upscale_factor)
return DatasetFromFolder(test_dir,
input_transform=input_transform(crop_size, upscale_factor),
target_transform=target_transform(crop_size))
示例3: get_eval_set
# 需要导入模块: import dataset [as 别名]
# 或者: from dataset import DatasetFromFolder [as 别名]
def get_eval_set(data_dir, nFrames, upscale_factor, data_augmentation, file_list, other_dataset, patch_size, future_frame):
return DatasetFromFolder(data_dir,nFrames, upscale_factor, data_augmentation, file_list, other_dataset, patch_size,future_frame,
transform=transform())
示例4: get_training_set
# 需要导入模块: import dataset [as 别名]
# 或者: from dataset import DatasetFromFolder [as 别名]
def get_training_set(upscale_factor):
root_dir = download_bsd300()
train_dir = join(root_dir, "train")
crop_size = calculate_valid_crop_size(256, upscale_factor)
return DatasetFromFolder(root_dir, 'train',
input_transform=input_transform(crop_size, upscale_factor),
target_transform=target_transform(crop_size))
示例5: get_test_set
# 需要导入模块: import dataset [as 别名]
# 或者: from dataset import DatasetFromFolder [as 别名]
def get_test_set(upscale_factor):
root_dir = download_bsd300()
test_dir = join(root_dir, "test")
crop_size = calculate_valid_crop_size(256, upscale_factor)
return DatasetFromFolder(root_dir, 'test',
input_transform=input_transform(crop_size, upscale_factor),
target_transform=target_transform(crop_size))
示例6: get_training_set
# 需要导入模块: import dataset [as 别名]
# 或者: from dataset import DatasetFromFolder [as 别名]
def get_training_set(upscale_factor):
root_dir = download_bsd300()
train_dir = join(root_dir, "train")
crop_size = calculate_valid_crop_size(256, upscale_factor)
return DatasetFromFolder(train_dir,
input_transform=input_transform(crop_size, upscale_factor),
target_transform=target_transform(crop_size))
示例7: get_training_set
# 需要导入模块: import dataset [as 别名]
# 或者: from dataset import DatasetFromFolder [as 别名]
def get_training_set(data_dir, hr, upscale_factor, patch_size, data_augmentation):
hr_dir = join(data_dir, hr)
return DatasetFromFolder(hr_dir,patch_size, upscale_factor, data_augmentation,
transform=transform())