Error using instance normalization

Hello everyone, I am currently doing a project using instance normalization as my batch size is 1.
However, whenever I start training, I get the following error below:

ValueError: InstanceNorm1d returns 0-filled tensor to 2D tensor.This is because InstanceNorm1d reshapes inputs to(1, N * C, …) from (N, C,…) and this makesvariances 0.

I know that this error occurs as my input shape after max pooling is (bs * C) while instancenorm1d only allows input shape (bs * C * N).
Does anyone have any idea how to solve this issue?
Or is there any way to train my model in batch size 1 with batch norm instead?
Thank you.