Expected more than 1 value per channel when training, got input size torch.Size([1, 4096])
在使用pytorch进行模型训练时报错:ValueError:Expectedmorethan1valueperchannelwhentraining,gotinputsizetorch.Size出现上述问题是因为batchsize=1,因为BN层里,遇到了batch=1的情况解决方案:1、如果是在训练的时候,则drop_last=Truetrain_loader=DataLoader(train