class BasicBlock7x7(nn.Module):
expansion = 1
def __init__(self, inplanes7, planes, stride=1, downsample=None):
    super(BasicBlock7x7, self).__init__()
    self.conv1 = conv7x7(inplanes7, planes, stride)
    self.bn1 = nn.BatchNorm1d(planes)
    self.relu = nn.ReLU(inplace=True)
    self.conv2 = conv7x7(planes, planes)
    self.bn2 = nn.BatchNorm1d(planes)
    self.downsample = downsample
    self.stride = stride

def forward(self, x):
    residual = x

    out = self.conv1(x)
    out = self.bn1(out)
    out = self.relu(out)

    out = self.conv2(out)
    out = self.bn2(out)

    if self.downsample is not None:
        residual = self.downsample(x)

    d = residual.shape[2] - out.shape[2]
    out1 = residual[:, :, 0:-d] + out
    out1 = self.relu(out1)
    # out += residual

    return out1

class BasicBlock9x9(nn.Module):
expansion = 1
def __init__(self, inplanes9, planes, stride=1, downsample=None):
    super(BasicBlock9x9, self).__init__()
    self.conv1 = conv9x9(inplanes9, planes, stride)
    self.bn1 = nn.BatchNorm1d(planes)
    self.relu = nn.ReLU(inplace=True)
    self.conv2 = conv9x9(planes, planes)
    self.bn2 = nn.BatchNorm1d(planes)
    self.downsample = downsample
    self.stride = stride

def forward(self, x):
    residual = x

    out = self.conv1(x)
    out = self.bn1(out)
    out = self.relu(out)

    out = self.conv2(out)
    out = self.bn2(out)

    if self.downsample is not None:
        residual = self.downsample(x)

    d = residual.shape[2] - out.shape[2]
    out1 = residual[:, :, 0:-d] + out
    out1 = self.relu(out1)
    # out += residual

    return out1