I did a training with an nn.InstanceNorm1d-layer and when I run it with a batch of inputs it works fine.:
for example [5,40,100]
but when I test it with a batch containing only one sample [1,40,100] it shows the same error message as you.
This is probably a bug