ValueError: Expected more than 1 value per channel when training, got input size torch.Size([1, 384]
这个错误通常发生在使用PyTorch训练神经网络时,输入数据维度不符合预期,不能batch_size整除。可能是输入的数据有剩余但不足以达到batch_size所导致的查阅资料发现:在torch.utils.data这个包中,DataLoader类下有一参数为:drop_last–settoTruetodropthelastincompletebatch,ifthedatasetsizeisnot