PyTorch 搭建CNN网络模型 手写数字识别 模型保存及加载
import torch
import torch.nn as nn
from torch.autograd import Variable
import torch.utils.data as Data
import torchvision
import matplotlib.pyplot as plt
import os
# 批训练加速模型的训练速度
EPOCH = 1
# 定义批次训练的batch数
BATCH_SIZE = 50
# 定义