Data science/각종 에러

ValueError: Expected more than 1 value per channel when training, got input size torch.Size([1, 32])

yunnaa 2023. 5. 1. 19:00

마지막 batch에 단일 training example만 있는 경우, 발생하는 에러

DataLoader의 drop_last=True로 설정

 

 

Expected more than 1 value per channel when training, got input size torch.Size([1, **])

I met an error when I use BatchNorm1d, code: ##% first I set a model class net(nn.Module): def __init__(self, max_len, feature_linear, rnn, input_size, hidden_size, output_dim, num__rnn_layers,

stackoverflow.com