The batchnorm layer would need more than a single value to calculate the stats (mean and var) from the input batch, so you would either need to use more than a single sample (increase the batch size) during training or increase the temporal dimension:
bn = nn.BatchNorm1d(10)
x = torch.randn(1, 10, 1)
out = bn(x)
> ValueError: Expected more than 1 value per channel when training, got input size torch.Size([1, 10, 1])

x = torch.randn(2, 10, 1)
out = bn(x) # works

x = torch.randn(1, 10, 2)
out = bn(x) # works