expected 4D input (got 3D input)
print(f'添加前:{image.shape}')
image = image.unsqueeze(0)
print(f'添加后:{image.shape}')
>>>添加前:torch.Size([3, 224, 224])
>>>添加后:torch.Size([1, 3, 224, 224])
print(f'添加前:{image.shape}')
image = image.unsqueeze(0)
print(f'添加后:{image.shape}')
>>>添加前:torch.Size([3, 224, 224])
>>>添加后:torch.Size([1, 3, 224, 224])