The new error is most likely raised by a batchnorm layer, which cannot calculate the batch statistics from a single sample (or element in this case). Increase the batch size during training and it should work.