ValueError: Expected more than 1 value per channel when training, got input size [1,768, 1, 1]报错解决方法 输入批次只有一个数据点,而由于BatchNorm操作需要多于一个数据计算平均值,因此造成该错误。 DataLoader中drop_last设置为True,把剩余的不够一个batch大小的数据扔掉 完美解决。