Debug Pytorch: ValueError: Expected more than 1 value per channel when training, got input size tor
ValueError: Expected more than 1 value per channel when training, got input size torch.Size([1, 512])当模型中有nn.BatchNorm时,batch不能设置为1,也不能出现样本最后一个batch可能就剩一个样本解决方法batch_size > 1DataLoader中设置 drop_last=True......