自己看读完pytorch封装的源码后,自己又重新写了一边(模仿其书写格式), 一些问题在代码中说明. import torch import torchvision import argparse import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from torchvision import datasets, transforms, models import torch.uti…