There is no padding involved and is not needed, since you never specify the batch size as a model attribute. As you’ve already explained, a batch size of 1 (potentially the last batch returned by the DataLoader) could create an error, if specific layers (such as batchnorm) cannot calculate some statistics using a single sample. The workaround would be to drop this batch as you’ve mentioned.
As @Usama_Hasan said, the input tensor should contain the batch dimension (usually in dim0) and your model will be able to deal with arbitrary batch sizes (assuming your system doesn’t run out of memory).
Usually you would call model.eval() while using the validation dataset or executing the inference, which switches the behavior of some modules. E.g. batchnorm layers will use their running stats and will thus not need to calculate the stats from the input batch and will not raise any errors for a single sample in the batch.