#加强版:三个卷积,分别是1x1,3x3,1x1,分别用来压缩维度,卷积处理,恢复维度,expansion是对输出通道数的倍乘
class BasicBlock2(nn.Module):
expansion = 4
def __init__(self, in_num, num, stride=1, downsample=None):
super(BasicBlock2, self).__init__()
self.conv1 = nn.Conv2d(ni_num, num, kernel_size=1, baid=False)
self.bn1 = nn.BatchNorm2d(num)
self.conv2 = nn.Conv2d(num, num, kernel_size=3, stride=stride,padding=1, baid=False)
self.bn2 = nn.BatchNorm2d(num)
self.conv3 = nn.Conv2d(num, num*self.expansion, kernel_size=1,baid=False)
self.bn3 = nn.BatchNorm2d(num*self.expansion)
self.relu = self.ReLU(True)
self.downsample = downsample
self.stride = stride
def forward(s