If reduction is not needed…
Option 1:
class L2Pool(nn.Module):
    def __init__(self, *args, **kwargs):
        super().__init__()
        ## DO NOT USE nn.Parameter HERE
        self.weight = torch.zeros(kernel_h, kernel_w).float()
    def forward(self, x):
        return torch.sqrt(nn.functional.conv2d(x ** 2, self.weight), stride...and so on)

Option 2
class L2Pool(nn.Module):
    def __init__(self, *args, **kwargs):
        super().__init__()
        self.pool = nn.AvgPool2d(*args, **kwargs)
        self.n = kernel_h * kernel_w
    def forward(self, x):
        return torch.sqrt(self.pool(x ** 2) * self.n)

Option 3
class L2Pool(nn.Module):
    def __init__(self, *args, **kwargs):
        super().__init__()
        kwargs["divisor_override"] = 1  # div 1 instead of kernel size
        self.pool = nn.AvgPool2d(*args, **kwargs)
    def forward(self, x):
        return torch.sqrt(self.pool(x ** 2))