关于Python torch报错的解决方法

``python

ValueError: Using a target size (torch.Size([8])) that is different to the input size (torch.Size([8, 1, 1, 1])) is deprecated. Please ensure they have the same size.

``
该如何解决呢

要求你输入一个4维数组,可是你输入的是1维数组