How can I use InstanceNorm layer with samples (batch size = 1)?
When I’m trying to do something like this:
x = torch.randn([1, 512])
m = nn.InstanceNorm1d(512)
m(x)

I’m getting error like this:
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.

Did I misunderstand something?