This error is raised by batchnorm layers, if the batch statistic cannot be calculated from a single input value.
If you are testing the model, you should call model.eval(), which will put all modules in evaluation mode, such that e.g. the batchnorm layers will apply their running estimates instead of calculating the stats from the current input batch.
Thus you could use the model even for single input images.