For a batch size of 1 you don’t need to use drop_last=True, as there won’t be a smaller batch at the end of the epoch.
The error should be raised by batchnorm layers, which cannot calculate the batch statistics using a single sample.
You should therefore either increase the batch size or call eval() on the batchnorm layers.