李沐笔记(使用块的网络VGG)
import torchfrom d2l import torch as d2lfrom torch import nn# 卷积层个数 输入通道个数 输出通道个数def vgg_block(num_convs,in_channels,out_channels): layars=[] for _ in range(num_convs): layars.append(nn.Conv2d(in_channels,out_channels,k...