transforms.GaussianBlur(kernel_size, sigma=(0.1, 2.0)) kernel_size:高斯卷积核大小
sigma:标准差(min,max)
import torchvision.transforms as transform
from PIL import Image
import matplotlib.pyplot as plt
import numpy as np
import torch
img0=Image.open('lin-xiao-xun-000003.jpg')
img1=transform.FiveCrop((160,160))(img0)
axs = plt.figure().subplots(1, 6)
axs[0].imshow(img0);axs[0].set_title('src');axs[0].axis('off')
axs[1].imshow(img1[0]);axs[1].set_title('1');axs[1].axis('off')
axs[2].imshow(img1[1]);axs[2].set_title('2');axs[2].axis('off')
axs[3].imshow(img1[2]);axs[3].set_title('3');axs[3].axis('off')
axs[4].imshow(img1[3]);axs[4].set_title('4');axs[4].axis('off')
axs[5].imshow(img1[4]);axs[5].set_title('5');axs[5].axis('off')
plt.show()
实图演示: