Batchnorm with multiple features and multiple channels

I want to perform a multi-input, multi-output regression using convolution layers. For this the input and output data has the form [N, F_{in/out}] with N: number of samples, F_{in/out}: number of input / output features.

Consequently, within my network I have activations of the form [B, C, F] with B: batch_size, C: channels, F: features to which I want to apply a Batchnorm layer.

I guess the correct way of applying a Batchnorm layer in this setting is to normalize each feature for each channel individually.

However neither torch.nn.Batchnorm1d nor torch.nn.Batchnorm2d fit these needs.

I am wondering how this could be achieved most intuitively, as I guess this is a standard application of the Batchnorm layer.

Using InstanceNorm gives what you what.