使用传统CNN网络训练图像分类模型 1. MNIST 首先,定义一下超参数等 import torch # dataset input_shape = 28 num_classes = 10 # hyper batch_size = 64 num_epochs = 5 learning_rate = 1e-3 # gpu device = torch.device('cuda'