hallo, I am new to pytorch, but I am enjoying this framework. I am having diffeculty in figuring out this message.can anyone help please !!
RuntimeError: The size of tensor a (10) must match the size of tensor b (32) at non-singleton dimension 0
I did a bit of debugging and I found that there is a collapse of labels happening in labels tensors
[[[-1.0000, -1.0000, -1.0000,  …, -1.0000, -1.0000, -1.0000],
[-1.0000, -1.0000, -1.0000,  …, -1.0000, -1.0000, -1.0000],
[-1.0000, -1.0000, -1.0000,  …, -1.0000, -1.0000, -1.0000],
…,
[-1.0000, -1.0000, -1.0000,  …, -1.0000, -1.0000, -1.0000],
[-1.0000, -1.0000, -1.0000,  …, -1.0000, -1.0000, -1.0000],
[-1.0000, -1.0000, -1.0000,  …, -1.0000, -1.0000, -1.0000]]]]) tensor([9, 2, 1, 1, 6, 1, 4, 6, 5, 7, 4, 5, 7, 3, 4, 1, 2, 4, 8, 0, 2, 5, 7, 9,
1, 4, 6, 0, 9, 3, 8, 8])
I created my model from scratch . I tried with batch_size 32 , it threw me this error. I tried with batch_size 1 , I got 320% accuracy (something wrong !). The error went away. so there is some dimensional mismatch  some where, I am lost! thanks a million !!! for your help and advise