'''torchvision'''
import torchvision
from torchvision.transforms import ToTensor
# ToTensor()的作用:
# 1.将输入转为tensor
# 2.图片格式转换为(通道,高,宽) #其他软件中常见的图片格式:(行,列,通道),一般是3通道,如(512,512,3)。但是在pytorch中经常为(通道,高,宽)
# 3.将像素值转换到(0,1)范围
'''dataset.MNIST内置数据--Dataset类型'''
# 通过MNIST下载内置数据,并创建为Dataset类型
train_ds = torchvision
6-1-torchvision、DataLoader的使用-MINIST
于 2022-05-03 16:06:22 首次发布