CNN——ResNet
残差块: ResNet18结构:
完整的代码:
import torch
import torchvision
from torch import nn
from torch.utils.data import DataLoader,Dataset
from torchvision import transforms
from d2l import torch as d2l
from torch.nn import functional as F
#数据集
def load_data_fashion_mnist(batch_size,resize):
trans = []
if resize:
trans.append(transforms.Resize(size=resize))
trans.append(transforms.ToTensor())
t
CNN——ResNet最先出现在Python成神之路。
共有 0 条评论