I was implementing it myself and compared my approach to yours.
Here is my module:
class AdaptiveBatchNorm2d(nn.Module):
    def __init__(self, num_features, eps=1e-5, momentum=0.1, affine=True):
        super(AdaptiveBatchNorm2d, self).__init__()
        self.bn = nn.BatchNorm2d(num_features, eps, momentum, affine)
        self.a = nn.Parameter(torch.FloatTensor(1, 1, 1, 1))
        self.b = nn.Parameter(torch.FloatTensor(1, 1, 1, 1))

    def forward(self, x):
        return self.a * x + self.b * self.bn(x)

Could you explain the difference between your approach registering the Variables as parameters and using nn.Parameter.
I also don’t know, why you set affine to False.
The original BN implementation introduced two parameters (gamma and beta)
(Btw. is there any option to write greek letters? \beta seems not to work)
As I understand the new formulation would be:
a * x + b * gamma * x_norm + b * beta

Thus using affine=False, you would lose the b * beta term or am I missing something?