Because you are using batch size 1 and your output is
1x102
however you are probably setting your ground truth as  an array of 102 values.
Since your input is 1x102 and your gt is just 102 they don’t match.
You have to unsqueeze your gt