版權歸屬:
更多關注:
transform_list = []
if opt.resize_or_crop == 'resize_and_crop':
osize = [192, 192]
transform_list.append(transforms.Resize(osize, Image.BILINEAR))
transform_list.append(transforms.RandomCrop(256, padding=64, fill=(255, 255, 255)))
這裏是PyTorch的代碼實現方案。