Hi,
What is the shape of your input tensor? According to the docs 11, nn.BatchNorm1d expects at minimum a 2D input tensor (batch_size x num_features). It says: “Applies Batch Normalization over a 2D or 3D input (a mini-batch of 1D inputs with optional additional channel dimension)”. From your error message, I would assume you are missing a batch dimension, but I may be wrong. If you could provide an example of an input tensor, we could help you debug (if the missing batch dimension is not the problem).