I am a bit confused by the definition of torch.nn.InstanceNorm1d

Documentation says either for an input (N,C,L) with num_features = C or for an input (N,L) with num_features = L

However it only accepts the 3D shape input, so when I unsqueeze (N,L) I am unsure about the best way to go around these 3 options:
(N,1,L) with num_features = 1 or num_features = L
(N,L,1) with num_features = L (this one seems a bit weird to me but still I ask)

Is there a “best” way to choose please ?


1 Like