human
4. Refactored ConvNet"
Please write code following the instructions in jupyter notebook style.
assistant
#Here is code to 4.

class ConvLayer(nn.Module):
    def __init__(self, ni, nf):
        super().__init__()
        self.conv = nn.Conv2d(ni, nf, kernel_size=3, stride=2, padding=1)
        
    def forward(self, x):
        return F.relu(self.conv(x))