Thanks your answer.  Can I ask you if we can fix the label size ,and change  the input size (torch.Size([128, 1, 1, 1])) to be [128]
for example,
input = input.reshape(-1)
to make the torch.Size([128, 1, 1, 1]) to be [128]
and so solve the question “UserWarning: different input and target sizes”