文章目录一.定义一个Pokemon的类,用于获取图片以及对应的label二.构建resblock三.搭建resnet四.设置一些超参数五.载入数据六.初始化模型,设置loss_function/optimizer/evaluation七.开始训练,并进行检验
import torch
from torch import nn
from torch.nn import functional as F
from torchvision import transforms
from torch.utils.data import DataLoader,Dataset
from torch impor
1