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