1、pytorch框架下默认维度张量默认采用[N, C, H, W]的顺序,并且数据范围在[0,1]
2、展平操作,常用在全连接之前
x=torch.flatten(x,start_dim=1)#从channnel维度开始展平,不用管batch_size x=view(x.shape[0],-1)#功能一样
3、model 'pil.image' has no attribute 'Transpose'
pillow的版本问题,过高版本用第一个
#ng_mirror90 = ng_rotate.transpose(Image.FLIP_LEFT_RIGHT) # 左右对换。 ng_mirror90 = ng_rotate.transpose(Image.Transpose.FLIP_LEFT_RIGHT)