#import import sys import d2lzh_pytorch as d2l import torch import torch.nn as nn import torch.optim as optim import time #net class Flatten(torch.nn.Module): #展平操作 def forward(self, x): return x.view(x.shape[0], -1) class Reshape(torch.nn.Module): #将图像大小重定型 def forward(self, x):