Solved by ptrblck in post #2 
              
              
                This error is raised, if a batchnorm layer cannot calculate the running statistics from a scalar value. 
Usually you would see it during training (model.train()) e.g. if the batch contains a single sample. 
This might be the case, if the length of your dataset is not divisible by the batch size with…