That would be syntactically correct.
However, I still think you shouldn’t reshape the tensor to get the batch size in dim1 in your current implementation.
Is nn.BatchNorm1d and model.eval() not working?
If so, could you post the stack trace so that we could have a look?